Welcome to Pyrogram

Telegram MTProto API Client Library for Python
Download Source code Community
Scheme Layer TgCrypto

from pyrogram import Client, Filters

app = Client("my_account")

def hello(client, message):
    message.reply("Hello {}".format(message.from_user.first_name))


Welcome to Pyrogram’s Documentation! Here you can find resources for learning how to use the library. Contents are organized into self-contained topics and can be accessed from the sidebar, or by following them in order using the Next button at the end of each page. But first, here’s a brief overview of what is this all about.


Pyrogram is a brand new Telegram Client Library written from the ground up in Python and C. It can be used for building custom Telegram applications that interact with the 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.
  • Updated to the latest Telegram API version, currently Layer 91 on top of MTProto 2.0.
  • Documented: The Pyrogram API is well documented and resembles the Telegram Bot API.
  • Full API, allowing to execute any advanced action an official client is able to do, and more.

To get started, press the Next button.