Welcome to wzgram’s documentation!

wzgram is an elegant, modern and asynchronous Telegram MTProto API framework for Python. It is a fork of Pyrogram and a drop-in replacement — the distribution is wzgram, the import stays pyrogram, and existing code runs unchanged.

from pyrogram import Client, filters

app = Client("my_account")

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

app.run()

What you get

  • Up to date with Telegram. Every parameter of every implemented method and type is checked against Bot API 10.2 and the TL schema at build time. Features walks what Telegram has shipped, in the order it shipped it — business accounts, paid media, gifts, stories, checklists, suggested posts, rich messages, ephemeral messages.

  • Conversations without state machines. Listeners waits for the next message or button press inline, inside the handler that asked for it.

  • Built to stay up. Client-side rate limiting, bounded memory on every transfer path, Rust cryptography, and a hot path measured rather than guessed — see Performance and Resource Budgets.

  • Portable sessions. Checksummed session strings that survive being copy-pasted, with every legacy format still decodable.

New here? Install Guide then Quick Start.