Go to file
2019-05-17 13:18:24 +02:00
.github Improve issue templates 2019-05-12 00:18:59 +02:00
compiler Add three more internal server errors 2019-05-17 13:13:58 +02:00
docs Docs revamp. Part 4 2019-05-16 21:28:34 +02:00
examples Update examples 2019-05-10 17:17:39 +02:00
pyrogram Remove get_chat_preview and have get_chat deal with ChatPreview objects 2019-05-17 13:18:24 +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 Include README.md into MANIFEST.in 2019-05-13 17:21:15 +02:00
NOTICE Update copyright year 2019-01-01 12:36:16 +01:00
README.md Update and rename README.rst to README.md 2019-05-13 17:15:00 +02:00
requirements.txt Make typing available for Python <3.5 only 2019-01-01 13:12:39 +01:00
setup.py Update setup.py 2019-05-13 17:17:20 +02:00

Pyrogram
Telegram MTProto API Framework for Python
Documentation Releases Community
Schema Layer TgCrypto Version

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 the latest Telegram API version, currently Layer 97 on top of MTProto 2.0.
  • 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!