Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Pyrogram Asyncio #181
Pyrogram Asyncio #181
Comments
|
v1.0 is now async! |
This issue tracks the eventual switch to asyncio as default Pyrogram variant.
Pyrogram heavily depends on IO-bound network code (it's a cloud-based messaging client library after all), and here's where asyncio shines the most by providing extra performance while running on a single OS-level thread only.
A fully asynchronous variant of Pyrogram is therefore available (Python 3.5.3 or higher is required). Use this command to install:
Pyrogram API remains the same and features are kept up to date from the non-async, default develop branch, but you are obviously required Python asyncio knowledge in order to take full advantage of it.
The idea to turn Pyrogram fully asynchronous is still under consideration, but is wise to expect that in future this would be the one and only way to work with Pyrogram.
You can start using Pyrogram Async variant right now as an excuse to learn more about asynchronous programming and do experiments with it!