Skip to main content

Fork of pyrogram. Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

Project description

Srigram

High-Performance Telegram MTProto API Framework for Python

PyPI version Python versions License Telegram Support


Srigram is an elegant, asynchronous, and deeply customizable Python framework built directly on top of the Telegram MTProto API. It empowers developers to build highly scalable bots and user accounts with minimal boilerplate.


⚡️ Why Srigram?

When building production-grade Telegram applications, you need a framework that doesn't just work, but stays ahead of the curve.

  • Modern UI Support: Natively supports the latest Telegram UI updates, including Bot API 9.4+ colored keyboards (primary, danger, success) and Custom Premium Emojis directly on buttons.
  • High-Concurrency Ready: Engineered from the ground up on Python's asyncio to handle thousands of concurrent updates seamlessly.
  • Unified Ecosystem: Write identical, intuitive code for both standard Bot Accounts and User Accounts (Userbots).
  • Direct MTProto Access: Built for power users. Drop down to raw MTProto schema methods whenever you need precise control over Telegram's backend.

⚙️ Installation

Install Srigram and its core dependencies via PyPI:

pip install -U pyrogram

Requires Python 3.8 or higher.

🚀 Quick Start

1. The Standard Bot

Building a highly responsive bot takes less than 15 lines of code.

from pyrogram import Client, filters

app = Client(
    "my_bot",
    api_id=1234567,
    api_hash="your_api_hash_here",
    bot_token="your_bot_token"
)

@app.on_message(filters.command("start") & filters.private)
async def hello(client, message):
    await message.reply_text("Hello from Srigram! 🚀")

if __name__ == "__main__":
    app.run()

2. Advanced: Smart Keyboards & Custom Emojis

Srigram makes it incredibly easy to utilize advanced Telegram UI features natively.

from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton

@app.on_message(filters.command("menu"))
async def send_menu(client, message):
    keyboard = InlineKeyboardMarkup(
        [
            [
                InlineKeyboardButton(
                    "Confirm Action", 
                    callback_data="confirm", 
                    style="success", # Renders a green button
                    icon_custom_emoji_id=5368324170671202286 # Native premium emoji support
                )
            ]
        ]
    )
    
    await message.reply_text("Please confirm your action below:", reply_markup=keyboard)

🤝 Contributing & Support

Srigram is actively maintained and thrives on community feedback. Whether you are hunting bugs, proposing features, or just want to show off what you've built:


Engineered with ❤️ by Srijan Majumdar.

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

kittygram-2.4.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kittygram-2.4.1-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file kittygram-2.4.1.tar.gz.

File metadata

  • Download URL: kittygram-2.4.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kittygram-2.4.1.tar.gz
Algorithm Hash digest
SHA256 2e9cc973b8a1bcceeae49cf769acebc7d626edd0439e6fbe94b87c7f6ccbf0bb
MD5 6f7dd41fe43c1e12597cf1d49614c28c
BLAKE2b-256 e339b465da07f0ca3377b3a0d56b0fbfb23a9b8cf20c0127b64eb44d02648173

See more details on using hashes here.

File details

Details for the file kittygram-2.4.1-py3-none-any.whl.

File metadata

  • Download URL: kittygram-2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kittygram-2.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bc80bae525d16c5931706c585125246e5f098258d994dfb8f3b62d2f8a7d788
MD5 8b8d365a76314ca536c8154c7565d757
BLAKE2b-256 07e38711c1a6dc71ae71cef1e22d9a5e382d91fde1d93808e70425d86abd799b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page