ferogram-py 0.0.0

Python bindings for the Ferogram MTProto framework
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 4.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 15.0 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ankit-chaubey/ferogram-py
    14 7 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ankit-chaubey

ferogram-py

Python bindings for Ferogram, a Telegram MTProto framework written in Rust.

Built with PyO3 and maturin. Supports Linux, macOS, Windows, and Android (Termux).

What is ferogram-py?

ferogram-py brings Ferogram to Python.

The heavy lifting is handled by the Rust core. Networking, MTProto, encryption, session management, file transfers, and update processing are implemented in Rust while exposing a clean and familiar async Python API.

Whether you're building bots, userbots, automation tools, or Telegram applications, ferogram-py aims to provide the simplicity of Python together with the performance and reliability of Rust.

Features

  • Async-first API
  • High-performance Rust backend
  • MTProto client support
  • Bot and userbot support
  • Raw Telegram API access
  • Session management
  • File uploads and downloads
  • Event handlers and filters
  • Cross-platform support

Installation

pip install ferogram

Pre-built wheels are published on PyPI for major platforms, making installation straightforward for most users.

Quick Start

from ferogram import Client, filters

app = Client(
    "mybot",
    api_id=123456,
    api_hash="YOUR_API_HASH",
    bot_token="YOUR_BOT_TOKEN",
)

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

app.run()

Why ferogram-py?

Most Telegram Python libraries are implemented entirely in Python.

ferogram-py takes a different approach. Performance-critical components are implemented in Rust while Python remains the primary developer experience.

This allows applications to benefit from Rust's speed and reliability without sacrificing Python's ease of use.

Status

ferogram-py is actively developed alongside Ferogram itself.

The current focus is on providing stable Python bindings while gradually exposing more Ferogram features as the ecosystem grows.

The goal is to keep the Python API intuitive for Python developers while staying close to the native Rust implementation.

Availability

The package is available on PyPI and can be installed using pip.

New releases generally follow Ferogram releases, although some features may arrive later in Python as the bindings evolve.

Links

Author

Ankit Chaubey