Pyrogram for MTPager for testing purposes
Go to file
2019-05-13 17:15:00 +02:00
.github Improve issue templates 2019-05-12 00:18:59 +02:00
compiler Use a better qualified name for both raw types and functions 2019-05-11 16:40:56 +02:00
docs Remove duplicated entry 2019-05-10 16:55:20 +02:00
examples Update examples 2019-05-10 17:17:39 +02:00
pyrogram Docs revamp. Part 2 2019-05-10 16:14:10 +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 Add mime.types in MANIFEST.in 2019-04-20 22:51:54 +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 Make sure mime.types actually gets installed 2019-04-30 10:45:27 +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!