Welcome to Tobigram¶
Telegram MTProto API Framework for Python
Homepage •
Development •
Documentation •
News
from pyrogram import Client, filters
app = Client("my_account")
@app.on_message(filters.private)
async def hello(client, message):
await message.reply("Hello from Tobigram!")
app.run()
Tobigram 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.
How the Documentation is Organized¶
Contents are organized into sections composed of self-contained topics which can be all accessed from the sidebar, or by following them in order using the Next button at the end of each page. You can also switch to Dark or Light theme or leave on Auto (follows system preferences) by using the dedicated button in the top left corner.
Here below you can, instead, find a list of the most relevant pages for a quick access.
First Steps¶
Quick Start: Overview to get you started quickly.
Install Guide: Installation guide with pip and uv.
Invoking Methods: How to call Tobigram’s methods.
Handling Updates: How to handle Telegram updates.
Error Handling: How to handle API errors correctly.
API Reference¶
Pyrogram Client: Reference details about the Client class.
Available Methods: List of available high-level methods.
Available Types: List of available high-level types.
Bound Methods: List of convenient bound methods.
Enumerations: List of available enumerations.
Update Handlers: List of available update handlers.
Filters: List of available update filters.
Telegram Raw API¶
Raw Functions: List of all raw Telegram functions.
Raw Types: List of all raw Telegram types.
Raw Base: List of all raw base types.
Features¶
Features: Modern features Telegram has shipped (Gifts, Stories, Topics, Business).
Listeners: Inline conversation flows without state machines.
Rate Limiting: Client-side rate limiting and throttling.
Session Strings: Checksummed portable session strings.
Voice & Video Calls: Native WebRTC voice chats and video streaming.
Meta¶
FAQ: Answers to common Tobigram questions.
Speedups: Boost performance with Rust cryptography and uvloop.
MTProxy Settings: Built-in MTProxy Fake-TLS support.
Web Proxy Settings: MTProto Web Proxy over WebSocket/TLS 1.3.