Tgram
A developer-friendly Telegram Bot API library designed for Python enthusiasts.
Channel • Documentation • Examples
🚀 Quick Start
Here's a basic example to get started with tgram:
import asyncio
from tgram import TgBot, filters
from tgram.types import Message
bot = TgBot("YOUR_BOT_TOKEN")
@bot.on_message(filters.text & filters.private)
async def on_message(bot: TgBot, message: Message) -> Message:
# Echo the incoming message
return await message.reply_text(
message.text,
entities=message.entities
)
asyncio.run(bot.run())
📦 Features
- Smart Plugins: Auto-loadable plugins for modular development.
- Filters for Handlers: Simplify event handling with filters.
- Bound Methods: Access bound methods for different update types easily.
📚 Documentation
Full documentation is available here.
🔧 Installation
You can install the tgram library using one of the following methods:
Via git:
pip install git+https://github.com/z44d/tgram -U
Via PyPI (Recommended)
pip install tgram -U
💡 Requirements
- Python: Version 3.10 or higher.
- Telegram Bot Token: Obtain one by following this guide.
💬 Help & Support
- For general questions and help, join our Telegram chat.
- Follow updates via the Telegram Channel.
Release files for tgram 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tgram-2.1.1.tar.gz | 209.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tgram-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 797.7 kB
Release files / tgram-2.1.1.tar.gz
| Download URL | tgram-2.1.1.tar.gz |
|---|---|
| Size | 209.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93b9c805a00c6c9a815b52405208f116a36275867f122f81c9ed51f86c58838f
|
|
BLAKE2b-256 checksum How to use checksums |
6d66dd288a0030e612ae910777009e8db36c798b7a077ef47fe9bbd65ef7e9d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 13, 2026.
Transparency logRelease files / tgram-2.1.1-py3-none-any.whl
| Download URL | tgram-2.1.1-py3-none-any.whl |
|---|---|
| Size | 588.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3580e8172748a9c27552e4612807506fd567a09246768347faa9490ecae25211
|
|
BLAKE2b-256 checksum How to use checksums |
95f3fbdf5602bc69e242d726c2ed71830ed31f0bdf3c1d7dd98a962d8b0d2ec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 13, 2026.
Transparency log