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.8.tar.gz
(159.3 kB
view details)
Built Distribution
tgram-1.11.8-py3-none-any.whl
(404.1 kB
view details)
File details
Details for the file tgram-1.11.8.tar.gz
.
File metadata
- Download URL: tgram-1.11.8.tar.gz
- Upload date:
- Size: 159.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 394faede985b6703219311723356cc6c4b360cc9b664c34508809a9f75c7cda6 |
|
MD5 | 6f4d3e37e2c1911529bb039e39865a82 |
|
BLAKE2b-256 | afb91405b6adb712a2809a17a9800109f53544d362e528958def5e2f9143f28f |
File details
Details for the file tgram-1.11.8-py3-none-any.whl
.
File metadata
- Download URL: tgram-1.11.8-py3-none-any.whl
- Upload date:
- Size: 404.1 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 | 2a680a12849d26aa26276337d8d52ef70a48e17dc0ddb2c4b71686c3ed65fcb7 |
|
MD5 | 7498f781c8a02c6bf13d764d4288b9f9 |
|
BLAKE2b-256 | 9636858912a875d6621aa054999c9b203d0fc69382b714b0042c2b7c3896318a |