Skip to content

Add async support #149

@Archmonger

Description

@Archmonger

Is there an existing issue for this?

  • I have searched the existing issues

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 use asyncio.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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority issue that needs to be resolvedtype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions