Add support for asynchronous usage
Is your feature request related to a problem? Please describe. I think as this project will grow it is good idea to allow to have async calls to API.
Describe the solution you'd like
I think that the best approach is to replace requests with httpx.
Describe alternatives you've considered n/d
Additional context n/d
Thanks for opening this request @karolzlot! We've discussed this a couple of times internally and I think I even looked specifically at httpx briefly to understand what it might look like. This is a very good opportunity, especially if the solution can easily continue to support both synchronous and asynchronous usage.
One more idea: as this is package intended to be used by other projects, it may be good idea to implement this funcionality with AnyIO: https://www.python-httpx.org/async/#anyio
I'm not too familiar with AnyIO—I would need to better understand it before weighing in.
I'm also thinking about how we might expose the (optional) async capability in this package—namely, I'd like to avoid or abstract the challenge of code color as much as possible.
I was also thinking about it. As far as I can see, there is no ideal solution: https://stackoverflow.com/questions/55152952/duplication-of-code-for-synchronous-and-asynchronous-implementations