Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyroratnagram-1.1.0.tar.gz.
File metadata
- Download URL: pyroratnagram-1.1.0.tar.gz
- Upload date:
- Size: 950.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89c9235c349f13076765ccac44233e7002dc03cbabed9f629e90eeb0ced01488
|
|
| MD5 |
1117b9360978b4186b064a367d087988
|
|
| BLAKE2b-256 |
0fc0c869953460ee7761296abbd1d63134631d09d02cf3913705f021838df502
|
Provenance
The following attestation bundles were made for pyroratnagram-1.1.0.tar.gz:
Publisher:
python-publish.yml on AnmolRatna25/PyroRatnaGram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyroratnagram-1.1.0.tar.gz -
Subject digest:
89c9235c349f13076765ccac44233e7002dc03cbabed9f629e90eeb0ced01488 - Sigstore transparency entry: 1155435574
- Sigstore integration time:
-
Permalink:
AnmolRatna25/PyroRatnaGram@6c3a10b6e4b1f180ebd4f9ce288829f3f22ee570 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/AnmolRatna25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6c3a10b6e4b1f180ebd4f9ce288829f3f22ee570 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyroratnagram-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pyroratnagram-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb54fc5901bdcfe000a92620c0d17639a21ed3b7c4ec26cd6dbb2dbdc309d3c
|
|
| MD5 |
146d3d440ad1c61b4d2fc51bdcc3005e
|
|
| BLAKE2b-256 |
1b19a35af18ec92a9c283eb36ee98f88cfed9a078b8b9dcbe105e962aa0820fe
|
Provenance
The following attestation bundles were made for pyroratnagram-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on AnmolRatna25/PyroRatnaGram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyroratnagram-1.1.0-py3-none-any.whl -
Subject digest:
feb54fc5901bdcfe000a92620c0d17639a21ed3b7c4ec26cd6dbb2dbdc309d3c - Sigstore transparency entry: 1155435580
- Sigstore integration time:
-
Permalink:
AnmolRatna25/PyroRatnaGram@6c3a10b6e4b1f180ebd4f9ce288829f3f22ee570 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/AnmolRatna25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6c3a10b6e4b1f180ebd4f9ce288829f3f22ee570 -
Trigger Event:
push
-
Statement type: