/tgram

Primary LanguagePythonMIT LicenseMIT

tgram

tgram

Very friendly BOT API library for Python developers.
Channel Documentation Examples

Supported Bot API version PyPI Downloads Telegram Channel Telegram Group Ruff Action Workflow Status Docs Action Workflow Status Release Action Workflow Status

Example Usage

from tgram import TgBot, filters
from tgram.types import Message

bot = TgBot("TOKEN")

@bot.on_message(filters.text & filters.private)
async def on_message(bot: TgBot, message: Message) -> Message:
    #Echo
    return await message.reply_text(
        message.text,
        entities=message.entities)

bot.run_for_updates()

Features

  • Smart plugins with auto-load.
  • Filters for handlers.
  • Bound methods for update types.

Requirements

How to install?

Here's how to install the tgram library. The commands are given below:

# With Git
pip install git+https://github.com/2ei/tgram -U

# With PyPi (Recommended)
pip install tgram -U

Help & Support