Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ferogram-py

PyPI Python Downloads License Telegram

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

Powered by a high-performance Rust core that takes care of networking, encryption, TL parsing, and session management so you can focus on writing clean, idiomatic Python.


Why ferogram-py?

Most of the heavy lifting in an MTProto client happens behind the scenes; networking, encryption, TL parsing, and keeping up with updates. ferogram-py lets a Rust core handle all of that, while exposing a clean, Pythonic API.

For most applications, the high-level API is all you'll need. But if you want to use a brand-new Telegram feature or need something more advanced, you can always drop down to the raw MTProto API and invoke requests directly.

The goal is to stay out of your way: simple things should be simple, and advanced things should still be possible.

Quick API reference: FEATURES.md


Install

pip install ferogram
Building from source
make dev      # editable install into .venv (builds the Rust extension)
make build    # release wheel for this machine
make codegen  # regenerate TL code without a Rust rebuild
make test     # run tests
make clean    # wipe .venv, target, dist, generated/

On Termux: pkg install rust clang python first. Rust-only change, don't want to wait on codegen: FEROGRAM_SKIP_CODEGEN=1 maturin develop


Quick start

Bot:

from ferogram import Client, filters

app = Client("mybot", api_id=0, api_hash="", bot_token="123:TOKEN")

@app.on_message(filters.command("start"))
async def start(client, message):
    await message.reply("Hello!")

app.run()

User:

import asyncio
from ferogram import Client

app = Client("myaccount", api_id=0, api_hash="", phone="+1234567890")

async def main():
    async with app as client:
        await client.send_message("me", "logged in")

asyncio.run(main())

Credentials also work from env vars: API_ID, API_HASH, BOT_TOKEN.

Logging

import ferogram.logging as fero_log

fero_log.setup()           # INFO to stderr
fero_log.setup(level=10)   # DEBUG

Architecture

architecture

The compiled extension (_ferogram.so) stays deliberately small: networking, encryption, session storage, and MTProto internals live in Rust. Everything you touch day to day, the client, handlers, filters, is plain Python and can change without a recompile.

Prebuilt Wheels for your platform

Wheels ship prebuilt for Linux (x86_64, aarch64), macOS (x86_64, arm64), Windows (x86_64), and Android/Termux (aarch64, x86_64). pip install ferogram grabs the right one on its own.


License

This project is dual-licensed under:

  • MIT License
  • Apache License 2.0

You may choose either license.

You are free to use, modify, and distribute this software, including for commercial use, provided the original license and copyright notice are included.

See LICENSE-MIT and LICENSE-APACHE for full details.


Developer

Developed by Ankit Chaubey

Don't forget to explore the Rust engine powering ferogram-py: ferogram. Thanks for being part of the journey.

Join the ferogram community! Questions, discussions, bugs report and feedback are always welcome. As the project grows, we'll eventually split Python and Rust discussions into dedicated spaces.

Metadata

Release files for ferogram 0.5.5b6

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

Source distribution (sdist)

Source distribution for ferogram 0.5.5b6
File Size Uploaded Provenance Actions
ferogram-0.5.5b6.tar.gz 804.4 kB With provenance Details for ferogram-0.5.5b6.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ferogram 0.5.5b6
File Actions
ferogram-0.5.5b6-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for ferogram-0.5.5b6-cp310-abi3-win_amd64.whl
ferogram-0.5.5b6-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for ferogram-0.5.5b6-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ferogram-0.5.5b6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for ferogram-0.5.5b6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
ferogram-0.5.5b6-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for ferogram-0.5.5b6-cp310-abi3-macosx_11_0_arm64.whl
ferogram-0.5.5b6-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for ferogram-0.5.5b6-cp310-abi3-macosx_10_12_x86_64.whl
ferogram-0.5.5b6-cp310-abi3-android_24_x86_64.whl CPython 3.10 abi3 Android API level 24+ x86-64 Details for ferogram-0.5.5b6-cp310-abi3-android_24_x86_64.whl
ferogram-0.5.5b6-cp310-abi3-android_24_x86.whl CPython 3.10 abi3 Android API level 24+ x86-32 Details for ferogram-0.5.5b6-cp310-abi3-android_24_x86.whl
ferogram-0.5.5b6-cp310-abi3-android_24_armeabi_v7a.whl CPython 3.10 abi3 Android API level 24+ ARM EABI v7a Details for ferogram-0.5.5b6-cp310-abi3-android_24_armeabi_v7a.whl
ferogram-0.5.5b6-cp310-abi3-android_24_arm64_v8a.whl CPython 3.10 abi3 Android API level 24+ ARM64 v8a Details for ferogram-0.5.5b6-cp310-abi3-android_24_arm64_v8a.whl

Total release size: 32.9 MB

Release files / ferogram-0.5.5b6.tar.gz

Download URL ferogram-0.5.5b6.tar.gz
Size 804.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4861dfedb051bddf4e760c8908085415fcfa1710f40e7ab0aee03842f5dba8f3
BLAKE2b-256 checksum
How to use checksums
3a3521ca0c746885da44e79f65a5586afd5c77b8687b75ad039a6a59d4574ba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-win_amd64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-win_amd64.whl
Size 3.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a53134400c4b07009402f01b28af13f4a714b17931c58fc3658ec9138191c722
BLAKE2b-256 checksum
How to use checksums
a83f1fcca31b2d8f1bd6e7e5b117a2f7442d250c251099d2fad594d24ec27a54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
359425dded39a46331498672ed85b58f0abb8c7c737b06ec9fbfcfe36592f362
BLAKE2b-256 checksum
How to use checksums
1a1acbcd7089a86df18538db3e4d17e110bdcf94f254cc16f6ad8cbae83be672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.4 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6a992b3305f3460b808f6900e403c2250e340eb27aacff819070b5b1a6cc8633
BLAKE2b-256 checksum
How to use checksums
72784f961bfe6e8080b5319f610ef23df6df230034bb9fa2175cfd27cb68d35a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-macosx_11_0_arm64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-macosx_11_0_arm64.whl
Size 3.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b4032e1d711becc772f0b0f64957df35e70c7313a8e6fd61bd0cad645d9977f
BLAKE2b-256 checksum
How to use checksums
0eafabcf42beb49430c0f55152b013f59c2a7e03ae2c94a4dc1f34b0b91948b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-macosx_10_12_x86_64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.6 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7adaa75c0a78f90635839c5c98e9ad723a14454d1dc73017518507947b50e918
BLAKE2b-256 checksum
How to use checksums
25725459fb519d98b20e924a635be2accf1373f5050bcfc368ba2cbbecedbdb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-android_24_x86_64.whl

Download URL ferogram-0.5.5b6-cp310-abi3-android_24_x86_64.whl
Size 3.7 MB
Tags Android API level 24+ x86-64 CPython 3.10 abi3
SHA-256 checksum
How to use checksums
35a4c5699250187e8a42d5f10af6302336c317ed45496ea6f201c1e2842d5166
BLAKE2b-256 checksum
How to use checksums
3f424b4c101c1137ab1bd5d0ebabd2d88f025f2aaf718cd0f2e79d4ab3faab05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-android_24_x86.whl

Download URL ferogram-0.5.5b6-cp310-abi3-android_24_x86.whl
Size 3.7 MB
Tags Android API level 24+ x86-32 CPython 3.10 abi3
SHA-256 checksum
How to use checksums
1cb3d4444ccf016cb1a4252849de5ef2ab43fa005a67d91fe4e3b0619800c50b
BLAKE2b-256 checksum
How to use checksums
c867471080390642e01fae5f44aa3721784db64fcd0d9b1504625eb8f8580d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-android_24_armeabi_v7a.whl

Download URL ferogram-0.5.5b6-cp310-abi3-android_24_armeabi_v7a.whl
Size 3.4 MB
Tags Android API level 24+ ARM EABI v7a CPython 3.10 abi3
SHA-256 checksum
How to use checksums
c737aa3cd8e7799af19d5b818c5f04d175ef18cbda5a35fab6be3640b3ba8801
BLAKE2b-256 checksum
How to use checksums
40151e23c186d88563df47b252086b3194de54661ac8d2f9e908cce2bf950f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / ferogram-0.5.5b6-cp310-abi3-android_24_arm64_v8a.whl

Download URL ferogram-0.5.5b6-cp310-abi3-android_24_arm64_v8a.whl
Size 3.5 MB
Tags Android API level 24+ ARM64 v8a CPython 3.10 abi3
SHA-256 checksum
How to use checksums
0a2fc49b3f2c62815c78acd77baa87362eb791b5df7b3c75467ddccdfdd4cadd
BLAKE2b-256 checksum
How to use checksums
0f389900c0983ee37ff69527b1f0401ac60fc17d490ccfcf8a270ac13383f1c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for ferogram 0.5.5b6

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.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for ferogram-0.5.5b6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release
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