Backblaze / b2-sdk-python

Python library to access B2 cloud storage.
Other
186 stars 61 forks source link

AsyncIO support #504

Closed kamilglod closed 4 months ago

kamilglod commented 5 months ago

I don't see any trace of async support in this SDK, do you have a plan to add it or I need to use loop.run_in_executor() each time I'm interacting with B2 API?

ppolewicz commented 5 months ago

Unfortunately there is not much demand for async support in SDK but writing this would be a huge undertaking.

Is there a specific part that you'd benefit from being exposed (upload?) or would everything have to be exposed as async?

kamilglod commented 5 months ago

For sure we would need upload (and possibly download) part async as we would do quite a lot of those. It would be super nice to use SDK over simple async http call (using httpx or similar).

ppolewicz commented 5 months ago

I've heard that https://pypi.org/project/aiob2/ works, though it doesn't support everything you can do in b2. It's not "official" though.

kamilglod commented 5 months ago

Thanks @ppolewicz, it doesn't looks too trusting but we can try it out. Thx :) please close this issue if you consider not worth implementing it in this lib.

ppolewicz commented 4 months ago

Realistically, this would have to be a new lib. Maybe one day?