Telegram MTProto API Client Library for Python
Download
β’
Documentation
β’
Community
from pyrogram import Client, Filters
app = Client("my_account")
@app.on_message(Filters.private)
async def hello(client, message):
await message.reply("Hello {}".format(message.from_user.first_name))
app.run()Pyrogram is a fast, fully asynchronous Telegram Client Library written from the ground up in Python and C. It can be used for building custom applications that interact with the Telegram MTProto API as both User and Bot.
- π¦ Easy to use: You can easily install Pyrogram using pip and start building your app right away.
- π High-level: The low-level details of MTProto are abstracted and automatically handled.
- β‘οΈ Fast: Crypto parts are boosted up by TgCrypto, a high-performance library written in pure C.
- β± Asynchronous: Pyrogram delivers extra performance while running on one OS-level thread only.
- π Updated to the latest Telegram API version, currently Layer 82 on top of MTProto 2.0.
- π Documented: Pyrogram public API is well documented and resemble the Telegram Bot API.
- π― Full API, allowing to execute any advanced action an official client is able to do, and more.
- π Python 3.5 or higher.
- π A Telegram API key.
pip3 install pyrogram- π The Docs contain lots of resources to help you getting started with Pyrogram: https://docs.pyrogram.ml.
- π‘ Reading Examples in this repository is also a good way for learning how things work.
- β Seeking extra help? Don't be shy, come join and ask our Community!
- βοΈ For other requests you can send an Email or a Message.
If you like Pyrogram, you are welcome to help make it even better by either submitting pull requests or reporting issues/bugs as well as suggesting best practices, ideas, enhancements on both code and documentation. Any help is appreciated!
