🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

tgram

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tgram

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.

1.13.0
PyPI
Maintainers
1
tgram

tgram

A developer-friendly Telegram Bot API library designed for Python enthusiasts.
ChannelDocumentationExamples

🚀 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
pip install tgram -U

💡 Requirements

  • Python: Version 3.8 or higher.
  • Telegram Bot Token: Obtain one by following this guide.

💬 Help & Support

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts