Telegram MTProto API Framework for Python
Documentation
•
Releases
•
Community
from pyrogram import Client, Filters
app = Client("my_account")
@app.on_message(Filters.private)
def hello(client, message):
message.reply_text("Hello {}".format(message.from_user.first_name))
app.run()
Pyrogram is an elegant, easy-to-use Telegram client library and framework written from the ground up in Python and C. It enables you to easily create custom apps for both user and bot identities (bot API alternative) via the MTProto API.