Open erlendvollset opened 2 years ago
Any update on this? Async support in general would be extremely welcome :)
@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 π
@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 :)
What's the status on this?
Also if we just make everything async, we could auto generate a sync client that just wraps it?
What's the status on this?
@andersfylling It was not able to get this task prioritized, so Iβm working on it on my own time. Iβm not entirely sure when itβll be ready, but Iβm hoping after Christmas π
@haakonvt let me know if you want any assistance!
Yes! π Making a temporary channel!
Just out of curiosity what is the decisions behind using httpx over aiohttp?
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 theresponses
mocking library.