Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyrogram Asyncio #181

Closed
delivrance opened this issue Dec 19, 2018 · 1 comment
Closed

Pyrogram Asyncio #181

delivrance opened this issue Dec 19, 2018 · 1 comment
Milestone

Comments

@delivrance
Copy link
Member

delivrance commented Dec 19, 2018

This issue tracks the eventual switch to asyncio as default Pyrogram variant.

  • Related questions can be freely posed here.
  • Specific issues with asyncio better be in new issues altogether.

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:

$ pip3 install -U https://github.com/pyrogram/pyrogram/archive/asyncio.zip

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!

@delivrance
Copy link
Member Author

v1.0 is now async!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant