Skip to main content

PyroRatnaGram
Telegram MTProto API Framework for Python
Homepage • Documentation • Issues • Support Chat • News/Releases

PyroRatnaGram

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

from pyrogram import Client, filters

app = Client("my_account")


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


app.run()

PyroRatnaGram 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.

Most Important Changes

  • KeyboardButton now supports style and icon_custom_emoji_id for richer reply keyboards.
  • Available ButtonStyle colors are PRIMARY (blue), DANGER (red), and SUCCESS (green).
  • Callback query handlers now support clear priority flow with group usage.
  • Documentation and project links were updated to the current PyroRatnaGram endpoints.

Breaking Changes

  • Package publishing identity is now pyroratnagram. Use pip3 install -U pyroratnagram for new installs and upgrades.
  • For private incoming text handlers, command exclusion should be moved to decorator-level filtering.

Old style:

@Client.on_message(filters.private & filters.text & filters.incoming)
async def pm_search(client, message):
    if str(message.text).startswith('/'):
        return

Recommended style:

@Client.on_message(filters.private & filters.text & filters.incoming & filters.regex(r"^(?!/)"))
async def pm_search(client, message):
    ...

Why this change matters: it prevents unnecessary handler execution, keeps handlers cleaner, and reduces logic duplication.

For the full list of updates, see CHANGELOG.md.

Key Features

  • Ready: Install PyroRatnaGram 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

pip3 install -U pyroratnagram

Resources

  • Check out the docs at https://pyroratna.ratna.pw to learn more about PyroRatnaGram, get started right away and discover more in-depth material for building your client applications.
  • Join the official Telegram Channel at https://t.me/official_RATNA and stay tuned for news, updates and announcements.

Metadata

Release files for pyroratnagram 1.1.0

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

Source distribution (sdist)

Source distribution for pyroratnagram 1.1.0
File Size Uploaded Provenance Actions
pyroratnagram-1.1.0.tar.gz 950.8 kB With provenance Details for pyroratnagram-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyroratnagram 1.1.0
File Interpreter ABI Platform Actions
pyroratnagram-1.1.0-py3-none-any.whl Python 3 none any Details for pyroratnagram-1.1.0-py3-none-any.whl

Total release size: 6.3 MB

Release files / pyroratnagram-1.1.0.tar.gz

Download URL pyroratnagram-1.1.0.tar.gz
Size 950.8 kB
Tags Source
SHA-256 checksum
How to use checksums
89c9235c349f13076765ccac44233e7002dc03cbabed9f629e90eeb0ced01488
BLAKE2b-256 checksum
How to use checksums
0fc0c869953460ee7761296abbd1d63134631d09d02cf3913705f021838df502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

Release files / pyroratnagram-1.1.0-py3-none-any.whl

Download URL pyroratnagram-1.1.0-py3-none-any.whl
Size 5.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
feb54fc5901bdcfe000a92620c0d17639a21ed3b7c4ec26cd6dbb2dbdc309d3c
BLAKE2b-256 checksum
How to use checksums
1b19a35af18ec92a9c283eb36ee98f88cfed9a078b8b9dcbe105e962aa0820fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

Security for pyroratnagram 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyroratnagram-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

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