Skip to main content

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

Project description

Srigram

Telegram MTProto API Framework for Python

HomepageIssuesSupport Chat & News

Srigram is an elegant, modern, and asynchronous Telegram MTProto API framework in Python for both users and bots.


✨ Key Features

  • Bleeding-Edge API 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.
  • Fully Asynchronous: Built from the ground up on asyncio to smoothly handle thousands of concurrent requests.
  • Dual Ecosystem: Write code for both normal Bot Accounts and standard User Accounts (Userbots) using the exact same intuitive API.
  • Modern Syntax: Clean, easy-to-read syntax inspired by modern Python development standards with minimal boilerplate.
  • Highly Customizable: Full access to raw MTProto methods for advanced developers who need to dig deep into Telegram's backend.

⚙️ Installation

You can install Srigram and its dependencies directly from PyPI using pip:

pip install srigram

Requires Python 3.8 or higher.

🚀 Quick Start

Building your first Srigram bot is incredibly simple. Here is a minimal example to get you started:

from srigram import Sri, filters

app = Sri(
    "my_bot",
    api_id=1234567,
    api_hash="your_api_hash_here",
    bot_token="your_bot_token" # Optional: Only if you are logging in as a bot!
)

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

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

🤝 Community & Support

We welcome contributions and feedback! If you run into bugs, have feature requests, or just want to see what's new:


Built 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

srigram-2.4.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

srigram-2.4.0-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file srigram-2.4.0.tar.gz.

File metadata

  • Download URL: srigram-2.4.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for srigram-2.4.0.tar.gz
Algorithm Hash digest
SHA256 c8454e8d5ea159c8616b3ae872027ceae08edd068d3729aef3a324b5861f3e2c
MD5 33d1cf71f1aecb5bea78927df005827f
BLAKE2b-256 f2df4b2d45f580104b5c47ca0446e2042c10404ae7ae7d8cefd2f564928f47b4

See more details on using hashes here.

File details

Details for the file srigram-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: srigram-2.4.0-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.10.12

File hashes

Hashes for srigram-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7de9f91898f2d5f384f7e79a5edb0428b205dc102ca52812652ec431de6b0ca1
MD5 43531eb20bf65d8453593489cade2596
BLAKE2b-256 d8540bbc55fde3eafba1de7fed5d3c5940811fc872a684dec025df201d85a479

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