Skip to main content

Partially Auto-generated and asynchronous Minimal Telegram BOT API framework in Python for bots

Project description

TGramBot

TGramBot is a partially auto-generated and asynchronous Minimal Telegram Bot API framework in Python for bots

This library is inspired by a number of other libraries:

Special thanks to Paul Larsen for his libraries

This Library is still in its Alpha phase

Most of the methods and types using in this library are auto-generated by scraping the official documentation of Telegram Bot Api

So the chance of getting bugs and errors are high. So please let us know through the issue section about the bug you have encountered.

Installing..

pip3 install tgrambot

Example

import asyncio

from tgrambot import Bot
from tgrambot.filters import Filters
from tgrambot.types import Message


bot = Bot("token", workers=50, parse_mode='MarkdownV2')

@bot.on_message(Filters.command('start'))
async def start_bot(c: Bot, m: Message):
    await c.send_message(m.chat.id, "Hola Amigo!")

async def main():
    await bot.run()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Examples

More examples are published in the example directory

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

TGramBot-0.0.1b1.tar.gz (36.9 kB view details)

Uploaded Source

File details

Details for the file TGramBot-0.0.1b1.tar.gz.

File metadata

  • Download URL: TGramBot-0.0.1b1.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for TGramBot-0.0.1b1.tar.gz
Algorithm Hash digest
SHA256 b2435c1f34f7badef2202f561c86c70883e14e8c4977bbfb31cfdae7f4cb1f7f
MD5 bea7f7ed722138450ea9cecc95d9857a
BLAKE2b-256 a2a95bfd16c7c328c335164a04576c746c3b2258acb2c9562ab298a4b28c5444

See more details on using hashes here.

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