Skip to main content

Very friendly BOT API library for python devs.

Project description

tgram
A very friendly BOT API library for python developers.
Channel Chat Documentation

tgram PyPI Downloads

Example Usage

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

bot = TgBot("TOKEN")
logging.basicConfig(level=logging.INFO)

@bot.on_message(filters.text)
async def on_message(bot: TgBot, message: Message) -> Message:
    #Echo
    return await bot.send_message(
        message.chat.id,
        message.text,
        entities=message.entities
    )

bot.run_for_updates()

TODO

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

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

LICENSE

MIT

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-1.0.6.tar.gz (41.2 kB view hashes)

Uploaded Source

Built Distribution

tgram-1.0.6-py3-none-any.whl (42.0 kB view hashes)

Uploaded Python 3

Supported by

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