Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
Project description
Irenogram
Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots.
Irenogram is a production-ready, actively maintained Pyrogram fork — fully compatible with existing Pyrogram code. Install as irenogram, import as pyrogram. No migration needed.
Features
- Telegram Bot API 9.6 — Managed Bots, Poll Revolution, Mini App keyboard buttons, new entity types
- Layer 224 MTProto — full schema coverage, all 2,200+ TL types implemented
- Managed Bots — create, control and fetch tokens for bots via API
- Poll Revolution — multiple correct answers, revoting, hidden results, shuffle, dynamic options
- Entity Expansion —
FORMATTED_DATE,DIFF_INSERT,DIFF_REPLACE,DIFF_DELETE - Todo/Checklist — full send, append, complete/incomplete support
- Stable sessions — no unknown constructor errors, fixed MTProto framing
- Python 3.8+ — fully async, works with
asyncioand frameworks
Installation
pip install irenogram
Quick Start
from pyrogram import Client
app = Client("my_account")
@app.on_message()
async def handle(client, message):
await message.reply("Hello!")
app.run()
Bot API 9.6 Examples
from pyrogram import Client
from pyrogram.types import PollOption, KeyboardButton, RequestPeerTypeManagedBot
app = Client("my_bot", bot_token="...")
@app.on_managed_bot()
async def on_new_managed_bot(client, managed_bot):
token = await client.get_managed_bot_token(managed_bot.bot_id)
print(f"New bot token: {token}")
async def main():
async with app:
await app.send_poll(
chat_id="me",
question="Best language?",
options=[PollOption("Python"), PollOption("Go"), PollOption("Rust")],
allows_revoting=True,
hide_results_until_close=True,
correct_option_ids=[0],
)
Links
- Docs: abirxdhack.github.io/irenogram
- Author: github.com/abirxdhack
- Repository: github.com/abirxdhack/irenogram
- Community: t.me/ISmartCoder
- Issues: github.com/abirxdhack/irenogram/issues
License
Irenogram is distributed under the terms of the GNU Lesser General Public License v3 (LGPLv3).
Project details
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 irenogram-2.3.73.tar.gz.
File metadata
- Download URL: irenogram-2.3.73.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35543d916bea86d00fc46c5aefbf82e74874b1b67e86d1aab34eda9d7393110a
|
|
| MD5 |
18a9f1aea9d20baae2f12c25de82169b
|
|
| BLAKE2b-256 |
99757edc846db667f1ef588b785a2c26756181f0483278944ed69fde27033e96
|
File details
Details for the file irenogram-2.3.73-py3-none-any.whl.
File metadata
- Download URL: irenogram-2.3.73-py3-none-any.whl
- Upload date:
- Size: 5.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
251e26d8e6a8326ce1f35b26916cfeb5a670ea33a3fa577170adec8c74441027
|
|
| MD5 |
fa0b1921ece7d541673eb30cb5a10fec
|
|
| BLAKE2b-256 |
c1da328e5d1e1705f9d3821409fd395295fd47944f10f3c248f25e921598e6c6
|