Go to file
2019-06-19 16:10:37 +02:00
.github Hint about how to ask good questions 2019-06-15 15:57:00 +02:00
compiler Hint about which DC exactly is having problems. 2019-06-12 12:41:55 +02:00
docs Revert: CallbackQuery edit_* bound methods renamed to edit_message_* 2019-06-14 04:53:04 +02:00
examples Update domain name references to pyrogram.org 2019-05-19 21:40:41 +02:00
pyrogram Update pyrogram/client to accommodate Storage Engines 2019-06-19 16:10:37 +02:00
.gitignore Update .gitignore to ignore the generated RPC error classes 2019-04-14 21:00:19 +02:00
COPYING Initial commit 2017-12-05 12:09:33 +01:00
COPYING.lesser Initial commit 2017-12-05 12:09:33 +01:00
MANIFEST.in Instruct Python to add schema.sql file to the package 2019-06-19 16:06:37 +02:00
NOTICE Update copyright year 2019-01-01 12:36:16 +01:00
README.md Docs revamp. Part 7 2019-05-25 01:37:55 +02:00
requirements.txt Bump pysocks version to 1.7.0 2019-05-20 17:59:29 +02:00
setup.py Instruct Python to add schema.sql file to the package 2019-06-19 16:06:37 +02:00

Pyrogram
Telegram MTProto API Framework for Python
Documentation Releases Community

Pyrogram

from pyrogram import Client, Filters

app = Client("my_account")


@app.on_message(Filters.private)
def hello(client, message):
    message.reply("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.

Pyrogram in fully-asynchronous mode is also available »

Working PoC of Telegram voice calls using Pyrogram »

Features

  • Easy: You can install Pyrogram with pip and start building your applications right away.
  • Elegant: Low-level details are abstracted and re-presented in a much nicer and easier way.
  • Fast: Crypto parts are boosted up by TgCrypto, a high-performance library written in pure C.
  • Documented: Pyrogram API methods, types and public interfaces are well documented.
  • Type-hinted: Exposed Pyrogram types and method parameters are all type-hinted.
  • Updated, to make use of the latest Telegram API version and features.
  • Bot API-like: Similar to the Bot API in its simplicity, but much more powerful and detailed.
  • Pluggable: The Smart Plugin system allows to write components with minimal boilerplate code.
  • Comprehensive: Execute any advanced action an official client is able to do, and even more.

Requirements

Installing

pip3 install pyrogram

Resources

Contributing

Pyrogram is brand new, and you are welcome to try it and 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!