b2-sdk-python icon indicating copy to clipboard operation
b2-sdk-python copied to clipboard

AsyncIO support

Open kamilglod opened this issue 1 year ago • 4 comments

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?

kamilglod avatar Jul 01 '24 09:07 kamilglod

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?

ppolewicz avatar Jul 01 '24 10:07 ppolewicz

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).

kamilglod avatar Jul 01 '24 13:07 kamilglod

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.

ppolewicz avatar Jul 02 '24 00:07 ppolewicz

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.

kamilglod avatar Jul 03 '24 09:07 kamilglod

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

ppolewicz avatar Aug 03 '24 19:08 ppolewicz