Open jgentil opened 1 year ago
Hi,
I have already implemented some parts of this client to work asynchronously, using aiohttp client. I'm pretty sure I could take on this one, but first I would like to better understand your approach, locally I have just added _async equivalents of the synchronous methods, without creating a separated class (IMO this streamlines things like signing jwt etc).
Happy to help @jgentil , Jakkie
Is your feature request related to a problem? Please describe.
The library is unusable in an asynchronous application like FastAPI as it causes blocking network IO calls, which disrupts the async event loop.
Describe the solution you'd like
Implement an AsyncFireblockSDK that uses a library like httpx instead of
requests
.Additional context
httpx itself has clever ways to separate the actual HTTP IO mechanism (which has to be async) from the building of the Request and Response objects themselves, so perhaps this would be pretty simple to build to mimic it's design. It also works synchronously so it is easy to replace requests with httpx entirely.