pyrogram

? Telegram MTProto API Client Library and Framework for Python

Github星跟踪图

Pyrogram

from pyrogram import Client, Filters

app = Client("my_account")


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

主要指标

概览
名称与所有者pyrogram/pyrogram
主编程语言Python
编程语言Python (语言数: 2)
平台
许可证GNU Lesser General Public License v3.0
所有者活动
创建于2017-12-12 09:37:41
推送于2024-12-23 21:00:22
最后一次提交2024-12-23 21:20:42
发布数139
最新版本名称v2.0.106 (发布于 )
第一版名称v0.4.0 (发布于 )
用户参与
星数4.5k
关注者数95
派生数1.5k
提交数4.1k
已启用问题?
问题数0
打开的问题数0
拉请求数278
打开的拉请求数63
关闭的拉请求数203
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?