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

Replace requests with aiohttp #983

Open
erlendvollset opened this issue Jul 26, 2022 · 3 comments
Open

Replace requests with aiohttp #983

erlendvollset opened this issue Jul 26, 2022 · 3 comments
Assignees

Comments

@erlendvollset
Copy link
Collaborator

erlendvollset commented Jul 26, 2022

We can get performance improvements (both wrt. memory and time) by moving to asyncio and aiohttp. We can let our internal APIs be async, and then use something like this to still support the sync interface we have today. Longer term we can expose a public async API aswell.

This will require significant changes to both HTTPClient/APIClient as well as the unit tests as these are tightly coupled with the requests library by using the responses mocking library.

@thomafred
Copy link

Any update on this? Async support in general would be extremely welcome :)

@haakonvt
Copy link
Contributor

@thomafred I've begun the work to move to httpx (which support both sync and async). The plan is as follows: replace requests with as few surprises as possible, then later design and decide on how we should expose the async API 😄

@haakonvt haakonvt self-assigned this Aug 21, 2024
@thomafred
Copy link

@thomafred I've begun the work to move to httpx (which support both sync and async). The plan is as follows: replace requests with as few surprises as possible, then later design and decide on how we should expose the async API 😄

Awesome :)

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

No branches or pull requests

3 participants