Very friendly BOT API library for Python developers.
Project description
tgram
A user-friendly Telegram Bot API library for Python developers.Channel • Documentation • Examples
🚀 Quick Start
Here's a basic example to get started with tgram:
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
)
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
tgram-1.11.7.tar.gz
(157.4 kB
view details)
Built Distribution
tgram-1.11.7-py3-none-any.whl
(401.9 kB
view details)
File details
Details for the file tgram-1.11.7.tar.gz
.
File metadata
- Download URL: tgram-1.11.7.tar.gz
- Upload date:
- Size: 157.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 603bb04956ac503452fe508e6b6c981ac133b90192e7d4c08e72bb4c286bbbba |
|
MD5 | f68a38217018a70ffbf957150cbe963d |
|
BLAKE2b-256 | e0c094f5e5b46b9fcc34fcbee7c3f120db8d0d7bbc7716ec351c1b535e7cab55 |
File details
Details for the file tgram-1.11.7-py3-none-any.whl
.
File metadata
- Download URL: tgram-1.11.7-py3-none-any.whl
- Upload date:
- Size: 401.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 641eb4acb9422f83e5f5874bb6695a362c0f40aa04993d4bb7c35f0c7760ed62 |
|
MD5 | 614954de938c022b8cc11e0e72e851e8 |
|
BLAKE2b-256 | 06c654e9a3ffe78cca480386b5e7ae3bd91acc3171809574e8196bbb67819e73 |