-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add async support #149
Labels
Comments
I created this issue to explain a maintainable way we could create async support in the future. |
Draft
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is there an existing issue for this?
Expected feature
Async support.
Possible Solutions
Use
aiohttp
to add async support.In order to keep our code simple, we should write all existing methods as async methods. Then, based on some kind of initialization parameter (ex
SonarrAPI(async=True)
we should run an abstract transformation on existing methods.To oversimplify how the abstract transformation would work,
async=True
would replace the async functions with sync wrappers that useasyncio.run
. This transformation would occur during__init__
.To minimize rewriting, we should implement a system similar to how
aiohttp-requests
creates and deletes the async session.Context / Reason
Library does not have async support.
Code of Conduct
The text was updated successfully, but these errors were encountered: