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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?