asyncio support?
See original GitHub issueWhich version of the SDK was used? Please provide the output of pip freeze
.
azure-storage-blob==1.1.0
azure-storage-common==1.1.0
azure-storage-file==1.1.0
azure-storage-nspkg==3.0.0
azure-storage-queue==1.1.0
What problem was encountered?
Will there be any support for asyncio
? I think the library would perform much better if asynchronous operations would be supported.
Thank you very much
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:16 (7 by maintainers)
Top Results From Across the Web
asyncio — Asynchronous I/O — Python 3.11.1 documentation
Hello World!: asyncio is a library to write concurrent code using the async/await syntax. asyncio is used as a foundation for multiple Python...
Read more >Async IO in Python: A Complete Walkthrough
Async IO is a concurrent programming design that has received dedicated support in Python, evolving rapidly from Python 3.4 through 3.7, and probably...
Read more >Asyncio support — python-can 4.0.0 documentation
This library supports receiving messages asynchronously in an event loop using the can.Notifier class. There will still be one thread per CAN bus...
Read more >Python Asyncio: The Complete Guide
It is proposed to make coroutines a proper standalone concept in Python, and introduce new supporting syntax. The ultimate goal is to help ......
Read more >Python Asyncio Part 4 – Library Support | cloudfit-public-docs
Python Asyncio Part 4 – Library Support. In the first three parts of this series on ... import aiohttp import asyncio async def...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bmc-msft thanks for the feedback! We are actively working on providing async support. Please stay tuned!
Hi @zezha-msft, I have a very good use case: “Could you please elaborate on your use case and why the lack of async support is hindering it?”.
Consider ASP.NET Core web framework and how it performs better than older versions of ASP.NET. Internally it uses Kestrel server, which internally uses libuv networking library, so it is using an event loop (or more, together with multi-threading). I think most of .NET community embraced asynchronous code, and nobody who has the possibility to use ASP.NET Core will go back to the older web framework, when coding in C# or other .NET languages.
asyncio is the Python built-in framework to support event loops and non-blocking IO operations. It enables much greater concurrency than synchronous code. As a side note, it supports different implementations of event loops and it can be used with the same libuv used by Kestrel. The brilliant Yury Selivanov wrote a library, called uvloop, which is a Cython wrapper around libuv library (first article about uvloop).
In my case, if I want to create a Python web application that works fast, I will choose asyncio. I am even building my own web framework to benefit from the speed of static typing given by Cython, when parsing web requests and responses. Since I like Azure Storage very much, I also wrote (for private use) functions to upload files to Blob Storage with asyncio. In this context, I use the official SDK only to generate shared access signatures.
@kutoga - I wrote functions to upload files of any size to Azure Blob Service with asyncio. Currently I keep this code private in Azure DevOps, but I can share it in GitHub for you, if you wish. You could also use multi-threading with Python to do concurrent uploads, with the official storage SDK. GIL is not a problem in this scenario.