Skip to main content

Telegram MTProto API Framework for Python

License

Ravengram

Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

Ravengram is a personal Pyrogram-family fork for Python, kept as a drop-in replacement for Pyrogram, with support for the latest Telegram features including Gifts, Stories, Topics, Business Accounts, and more. It is maintained independently so that Telegram API updates can be pulled in without waiting on any upstream release schedule.

from pyrogram import Client, filters

app = Client("my_account")


@app.on_message(filters.private)
async def hello(client, message):
    await message.reply("Hello from Ravengram!")


app.run()

Ravengram is a modern, elegant and asynchronous MTProto API framework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot identity (bot API alternative) using Python.

Key Features

  • Ready: Install Ravengram with pip and start building your applications right away.
  • Easy: Makes the Telegram API simple and intuitive, while still allowing advanced usages.
  • Elegant: Low-level details are abstracted and re-presented in a more convenient way.
  • Fast: Boosted up by TgCrypto, a high-performance cryptography library written in C.
  • Type-hinted: Types and methods are all type-hinted, enabling excellent editor support.
  • Async: Fully asynchronous (also usable synchronously if wanted, for convenience).
  • Powerful: Full access to Telegram's API to execute any official client action and more.

Installing

This is currently a local, unpublished fork. Install it straight from your own clone:

pip install -e .

Optional dependencies

pip install -e ".[fast]"     # TgCrypto and uvloop for better performance
pip install -e ".[qrcode]"   # QR code login support

Once you push this to your own GitHub repo (see the Source/Issues URLs in pyproject.toml), replace the command above with a pip install git+https://github.com/ahmedahah4/ravengram install, or publish it to PyPI under your own package name.

Keeping it up to date with Telegram's API

Telegram's raw API surface lives in the TL schema files under compiler/api, and the pyrogram.raw layer is generated from them by the compiler package (see the Makefile for the compile target). When Telegram ships new methods/types, update the schema there and re-run the compiler instead of waiting on an upstream release.

Metadata

Release files for Ravengram 2.2.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Ravengram 2.2.26
File Size Uploaded
ravengram-2.2.26.tar.gz 861.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Ravengram 2.2.26
File Interpreter ABI Platform
ravengram-2.2.26-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 MB

Release files / ravengram-2.2.26.tar.gz

Download URL ravengram-2.2.26.tar.gz
Size 861.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dc1ccc4281a819362ed29391017ff5e34e071c1105d91c7aefa7f70c77ea1a0e
BLAKE2b-256 checksum
How to use checksums
43779b8e1e0b4ffd718d3092a129a569240b7af6895f30a3c11f0c0d5dd97800
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ravengram-2.2.26-py3-none-any.whl

Download URL ravengram-2.2.26-py3-none-any.whl
Size 6.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
00fe1247a8e8f3e15c317c71dbe38c21a478b25290db57eff410ba9203277a4a
BLAKE2b-256 checksum
How to use checksums
f37c54bab313f0a61392ffb6a02f46ac634c6a6a7eacb42376f3d7be6ff86033
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

2.2.27

2 release files

This release

2.2.26 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page