⚡ Indogram
Elegant, modern, and asynchronous Telegram MTProto API Framework in Python
Dual-import support: works with both import indogram and import pyrogram
📖 Overview
Indogram is an actively maintained MTProto API framework for Python. It empowers developers to interact effortlessly with the Telegram MTProto API via both user accounts (custom clients/userbots) and bot identities (Bot API alternative).
Indogram is built with Dual-Import Architecture:
- 🚀 New Projects: Use
from indogram import Client, filters, types - 🔄 Existing Projects: Drop-in compatible with
from pyrogram import Client, filters, types(no code changes needed for existing bots and plugins!)
✨ Features
- Dual-Import Compatibility: Import as
indogramorpyrograminterchangeably with 100% shared module and class identities. - Modern Telegram Features: Support for Stories, Topics, Forum Channels, Business Accounts, Star Gifts, Reactions, and more.
- Async & Fast: Built for
asyncio, with optional C-accelerated speedups via TgCrypto anduvloop. - Fully Typed: Rich type annotations with PEP 561 compliance (
py.typed) for autocomplete in VS Code, PyCharm, and language servers. - Easy & Intuitive: Clean decorator-based event handlers (
@app.on_message(),@app.on_callback_query(), etc.).
📦 Installation
Stable / Local Package
pip install indogram
High-Performance (TgCrypto & uvloop)
pip install "indogram[fast]"
QR Code Login Support
pip install "indogram[qrcode]"
Development / Direct from Source
git clone https://github.com/kurigram-org/kurigram indogram
cd indogram
pip install .
🚀 Quick Start
1. Simple Echo Bot (using indogram)
from indogram import Client, filters
from indogram.types import Message
# Initialize client (Get api_id and api_hash from https://my.telegram.org)
app = Client(
"my_bot",
api_id=1234567,
api_hash="your_api_hash_here",
bot_token="your_bot_token_here",
)
@app.on_message(filters.command("start"))
async def start_command(client: Client, message: Message):
await message.reply_text("👋 Halo! Selamat datang di bot yang ditenagai oleh **Indogram**!")
@app.on_message(filters.text & filters.private)
async def echo(client: Client, message: Message):
await message.reply_text(f"Anda berkata: {message.text}")
if __name__ == "__main__":
app.run()
2. Userbot / MTProto Client
import asyncio
from indogram import Client
app = Client(
"my_account",
api_id=1234567,
api_hash="your_api_hash_here",
)
async def main():
async with app:
me = await app.get_me()
print(f"Logged in as: {me.first_name} (@{me.username})")
await app.send_message("me", "✨ Pesan tes dari Indogram!")
if __name__ == "__main__":
asyncio.run(main())
3. Existing Pyrogram Code (Zero Changes Required)
Existing code written for Pyrogram continues to work out-of-the-box:
from pyrogram import Client, filters
app = Client("legacy_bot", bot_token="TOKEN")
@app.on_message(filters.text)
async def handler(client, message):
await message.reply("Still works seamlessly with Indogram!")
app.run()
🛠️ Building & Recompiling MTProto Schemas
If you modify API TL schemas or need to build distribution wheels:
# Compile MTProto API & error definitions
python -c "from compiler.api.compiler import start; start(False); from compiler.errors.compiler import start as start_err; start_err()"
# Build wheel & sdist distributions
python -m build
📄 License & Attribution
Indogram is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0).
- Based on and derived from Kurigram and Pyrogram (Copyright © Dan dan@pyrogram.org).
- Maintained and customized for Indogram.
Metadata
Release files for indogram 2.2.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| indogram-2.2.26.tar.gz | 801.5 kB | Without provenance | Details for indogram-2.2.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| indogram-2.2.26-py3-none-any.whl | Python 3 | none | any | Details for indogram-2.2.26-py3-none-any.whl |
Total release size: 7.0 MB
Release files / indogram-2.2.26.tar.gz
| Download URL | indogram-2.2.26.tar.gz |
|---|---|
| Size | 801.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cf3506ad7df0c25f1cfac462279f57ae50b227f71952ad871fa95d9f64b8774
|
|
BLAKE2b-256 checksum How to use checksums |
9964c629918f196d8e4884d74b78221e183660315889029dac460f0626df3ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / indogram-2.2.26-py3-none-any.whl
| Download URL | indogram-2.2.26-py3-none-any.whl |
|---|---|
| Size | 6.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a204b27fb4ef7313ece89c0aa499a901e948169587106bb72281d5fc1142f133
|
|
BLAKE2b-256 checksum How to use checksums |
0b409bc53f00d3af9ad53fc95b309dde520da844b7a3bd2b6b142250a00c6f19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for indogram 2.2.26
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.