Welcome to Pyrogram

Telegram MTProto API Framework for Python
Source Code Releases Community

from pyrogram import Client, filters

app = Client("my_account")

async def hello(client, message):
    await message.reply_text(f"Hello {message.from_user.mention}")


Pyrogram is a modern, elegant and easy-to-use Telegram 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.

How the Documentation is Organized

Contents are organized into sections composed of self-contained topics which can be all accessed from the sidebar, or by following them in order using the Next button at the end of each page. Here below you can, instead, find a list of the most relevant pages for a quick access.

Cloud Credits

If you need a cloud server to host your applications, we recommend using Hetzner Cloud. Sign up with this link to get €20 in cloud credits and help support Pyrogram as well.

First Steps

API Reference