Skip to main content

Telegram MTProto API Client Library for Python

Project description

Pyrogram

Telegram MTProto API Framework for Python

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 using 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!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Pyrogram-0.12.0.tar.gz (293.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Pyrogram-0.12.0-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file Pyrogram-0.12.0.tar.gz.

File metadata

  • Download URL: Pyrogram-0.12.0.tar.gz
  • Upload date:
  • Size: 293.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for Pyrogram-0.12.0.tar.gz
Algorithm Hash digest
SHA256 f7a7d435be603c1f875f1fd8c069115620a761e36aec12405187fa6155c20886
MD5 d32a9ff47cf75d8d00cd940ea08c1fb7
BLAKE2b-256 93ba122b3ac7f478a885a53fb97774dbb7ad8aa5d2401f5d8d65ba0e8610bb4a

See more details on using hashes here.

File details

Details for the file Pyrogram-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: Pyrogram-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for Pyrogram-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6bd333903abb1f8cec434b9921291ddc8c85c4416f0302cd6cbb6f13c8d908
MD5 f221ffc8c21c06a80e53a0eb76950056
BLAKE2b-256 28abc0e8118a6631ecd0455e6a656198853e1425313a609f7bc859cc0f424b5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page