Tgram is a user-friendly and lightweight Python library that simplifies interaction with the Telegram Bot API. It allows developers to easily create, manage, and automate Telegram bots.
Project description
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.8 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tgram-2.0.4.tar.gz.
File metadata
- Download URL: tgram-2.0.4.tar.gz
- Upload date:
- Size: 185.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845a6bdd1279ea3c140760c14d0c57e17c4aea3d2da1fbc89a62803f16624847
|
|
| MD5 |
d112a2d22201dcc9c629d83ccc7de145
|
|
| BLAKE2b-256 |
65eb870191f14fad3cadcadc9577b303726373fd04e615540b63020e02e73ea6
|
Provenance
The following attestation bundles were made for tgram-2.0.4.tar.gz:
Publisher:
release.yml on z44d/tgram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tgram-2.0.4.tar.gz -
Subject digest:
845a6bdd1279ea3c140760c14d0c57e17c4aea3d2da1fbc89a62803f16624847 - Sigstore transparency entry: 940668352
- Sigstore integration time:
-
Permalink:
z44d/tgram@0db63d1fa9fb310a8ba2e992f1272bc9395171cd -
Branch / Tag:
refs/tags/v2.0.4 - Owner: https://github.com/z44d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0db63d1fa9fb310a8ba2e992f1272bc9395171cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file tgram-2.0.4-py3-none-any.whl.
File metadata
- Download URL: tgram-2.0.4-py3-none-any.whl
- Upload date:
- Size: 490.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e66ce5447a7e90464934bcb66892250a1b45ab8c1a70d3f3d74a5cd24e39f8e0
|
|
| MD5 |
84d724cd92175c47424340ef25cc3e0e
|
|
| BLAKE2b-256 |
4a6da731367731b85bf7aafc646c3879a7a45f770c28f4ba0f4ffbc19406600b
|
Provenance
The following attestation bundles were made for tgram-2.0.4-py3-none-any.whl:
Publisher:
release.yml on z44d/tgram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tgram-2.0.4-py3-none-any.whl -
Subject digest:
e66ce5447a7e90464934bcb66892250a1b45ab8c1a70d3f3d74a5cd24e39f8e0 - Sigstore transparency entry: 940668364
- Sigstore integration time:
-
Permalink:
z44d/tgram@0db63d1fa9fb310a8ba2e992f1272bc9395171cd -
Branch / Tag:
refs/tags/v2.0.4 - Owner: https://github.com/z44d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0db63d1fa9fb310a8ba2e992f1272bc9395171cd -
Trigger Event:
push
-
Statement type: