Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Asynchronous Implementation and Pydantic Support #91

Open
bahadiraraz opened this issue May 18, 2024 · 2 comments
Open

[Feature] Asynchronous Implementation and Pydantic Support #91

bahadiraraz opened this issue May 18, 2024 · 2 comments

Comments

@bahadiraraz
Copy link

bahadiraraz commented May 18, 2024

Due to the use of synchronous requests in the library, functions such as get_transaction_history can take a long time to execute, posing significant challenges for developers looking to build async APIs. Additionally, many Python developers utilize Pydantic for data validation, so incorporating Pydantic into the library can greatly simplify its usage.

For those interested in an asynchronous implementation, I have created a library, app-store-server-library-python-async, which uses httpx for async operations. The library also includes guidance on how to incorporate Pydantic for data validation. You can review the code and see how to implement these features.

If you have any questions or suggestions, feel free to reach out!

@woosal1337
Copy link

This is a crucial case for the async mobile application architecture. Most applications, if not all, utilize async client-side functions. Consequently, the current version of the library would significantly lock down and slow the system, making it non-scalable as the user base grows.

As mentioned in issue #35, Pydantic would be a more suitable implementation. Pydantic is constantly updated and widely adopted by professional libraries used in hundreds of thousands of projects, making it a de facto standard. Additionally, Pydantic's built-in validation support, exceptions, and error handling improve developer understanding and ease of implementation, distinguishing it from the attrs library.

@Reskov
Copy link

Reskov commented May 22, 2024

@bahadiraraz There is also another httpx library fork with slightly different approach, it has official library as dependency for a data classes import. Probably you can cooperate with @ipfans, and work together?
https://github.com/ipfans/aio-appstoreserverlibrary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants