Skip to main content
vekgram

vekgram

PyPI Python Downloads License Documentation

Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

Full documentation: vekgram.com

vekgram is a drop-in replacement for Pyrogram, with access to the latest Telegram features including Gifts, Stories, Topics, Business Accounts, and more. Import vekgram; from pyrogram import ... still resolves to the same module rather than a second copy of it, so an existing Pyrogram codebase runs unchanged. Coming from Pyrogram or wzgram? Read the migration guide.

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()

from pyrogram import Client, filters works too — both names are one module: vekgram.types.Message is pyrogram.types.Message.

Key Features

  • Drop-in Replacement — New code says from vekgram import ...; existing from pyrogram import ... codebases migrate with zero changes, since both names are one module.
  • Up-to-Date — Bot API 10.5 (November 22, 2026) and the latest TL layer: Gifts, Stories, Topics, Business Accounts, Giveaways, bot settings, widgets, rich messages.
  • Async Natively — Fully async/await throughout. Also usable synchronously via app.run() for convenience.
  • Type-hinted — Every type and method is annotated for excellent editor support.
  • Fast — Boosted by WarpCrypto, a high-performance cryptography library written in Rust. warpcrypto is a core dependency, so it is always installed with vekgram.
  • Powerful — Full access to Telegram's API for any official client action and more.
  • Tuned for bots that move files — priority download queue (small files jump ahead), split upload/download concurrency budgets, staggered flood-wait retries, slower keepalives on media sessions, and a default rate limiter for bots. All tunable via VEKGRAM_* environment variables (see performance docs).

Example with Inline Keyboard

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

app = Client("my_bot")


@app.on_message(filters.command("start"))
async def start(client, message):
    await message.reply(
        "Choose an option:",
        reply_markup=InlineKeyboardMarkup([
            [
                InlineKeyboardButton("Website", url="https://example.com"),
                InlineKeyboardButton("Help", callback_data="help"),
            ],
            [InlineKeyboardButton("About", callback_data="about")],
        ])
    )


app.run()

Installing

pip install vekgram

Or in requirements.txt:

vekgram[fast]

Requires Python 3.10+. vekgram[fast] additionally pulls in uvloop on Linux and macOS (CPython); call uvloop.install() yourself to use it (see the Speedups guide). Because warpcrypto is a core dependency, vekgram[fast] automatically installs both uvloop and warpcrypto — the same way wzgram[fast] did:

pip install "vekgram[fast]"

Do not install pyrogram and vekgram side by side: they provide the same pyrogram module and whichever was installed last wins. Run pip uninstall pyrogram first if it is already there.

Development

# Clone the repo
git clone https://github.com/yuIlariy/vekgram.git
cd vekgram

# Install uv (if not already)
pip install uv

# Create virtual environment with dev dependencies
uv sync --frozen --extra dev

# Generate TL API types
uv run poe api

# Run tests
uv run poe test

Publishing to PyPI

Releases are fully automatic and published with PyPI Trusted Publishing (OIDC) — no API token is stored anywhere. Push a version tag (git tag v3.1.8 && git push origin v3.1.8) and .github/workflows/publish.yml builds the package, runs uv publish dist/* (the id-token: write permission in the vekgram environment lets uv exchange the OIDC token automatically), and creates the GitHub release with the dist/ assets. The trusted publisher on PyPI is registered for this repository (yuIlariy/vekgram), workflow publish.yml, environment vekgram, any ref. pip install vekgram always comes from PyPI, not from GitHub releases. One-click release: Actions → Release → Run workflow (.github/workflows/release.yml bumps __version__ in pyrogram/__init__.py, commits, tags and pushes — which triggers the publish).

Credits

Resources

Metadata

Release files for vekgram 3.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vekgram 3.6.1
File Size Uploaded Provenance Actions
vekgram-3.6.1.tar.gz 1.0 MB Without provenance Details for vekgram-3.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vekgram 3.6.1
File Interpreter ABI Platform Actions
vekgram-3.6.1-py3-none-any.whl Python 3 none any Details for vekgram-3.6.1-py3-none-any.whl

Total release size: 7.9 MB

Release files / vekgram-3.6.1.tar.gz

Download URL vekgram-3.6.1.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
18d2b41ed0b258a52e9ae0f8ad6928667d2dbccda4fe72a33b5f91b0fc03bdf3
BLAKE2b-256 checksum
How to use checksums
4b3b504c4f2ff7e0a5a5455b43999de5589ac88437ad43a29ddf5ae9044a7ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vekgram-3.6.1-py3-none-any.whl

Download URL vekgram-3.6.1-py3-none-any.whl
Size 6.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5e50f0cceb39cbb2b161e8e582dd13d0a2bb919d7d232a8e54e5b3ccf1ab8dbf
BLAKE2b-256 checksum
How to use checksums
718f61707373908b20032c117abc39d9d7b555e4efef16d34671d82a7207c5c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for vekgram 3.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page