Welcome to vekgram’s documentation!

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

from vekgram import Client, filters

app = Client("my_account")

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

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. Opt-in 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.