Skip to main content

A simple telegram bot framework on top of Python asyncio

Project description

Baymax, a simple telegram bot framework on top of Python asyncio

Work in progress


  • Python 3.7 or higher


pip install baymax

Basic usage example

from import Bot

bot = Bot('token')

async def start_handler(message):
    await bot.reply(message, 'Welcome!')

Middleware example

async def message_logging_middleware(raw_update):'New update received: %s', raw_update['update_id'])
NOTE: All middleware functions should be coroutines for now, even if they do not have asynchronous actions.

Reply keyboard markup example

from baymax.markups import KeyboardButton, ReplyKeyboardMarkup

async def rate_handler(message):
    await bot.reply(message, 'Rate me', reply_markup=ReplyKeyboardMarkup(
        ], resize_keyboard=True, one_time_keyboard=True))
NOTE: Reply markup API / objects will be changing, they are far from good now.

Running tests

git clone
pip install -e .
pip install -r requirements-test.txt

Project details

Download files

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

Files for baymax, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size baymax-0.0.5-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page