Skip to main content

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.
ChannelDocumentationExamples

🚀 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tgram-2.0.4.tar.gz (185.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tgram-2.0.4-py3-none-any.whl (490.6 kB view details)

Uploaded Python 3

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

Hashes for tgram-2.0.4.tar.gz
Algorithm Hash digest
SHA256 845a6bdd1279ea3c140760c14d0c57e17c4aea3d2da1fbc89a62803f16624847
MD5 d112a2d22201dcc9c629d83ccc7de145
BLAKE2b-256 65eb870191f14fad3cadcadc9577b303726373fd04e615540b63020e02e73ea6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tgram-2.0.4.tar.gz:

Publisher: release.yml on z44d/tgram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tgram-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e66ce5447a7e90464934bcb66892250a1b45ab8c1a70d3f3d74a5cd24e39f8e0
MD5 84d724cd92175c47424340ef25cc3e0e
BLAKE2b-256 4a6da731367731b85bf7aafc646c3879a7a45f770c28f4ba0f4ffbc19406600b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tgram-2.0.4-py3-none-any.whl:

Publisher: release.yml on z44d/tgram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page