Skip to main content

baleon

Simple, async-first Python framework for building Bale bots.

Install

pip install baleon

For local development:

pip install -e ".[dev]"

Quick start

from baleon import Bot

bot = Bot("TOKEN")

@bot.api.command("start")
async def start(message):
    await message.reply("Welcome to baleon")

@bot.api.on_message()
async def echo(message):
    if message.text:
        await message.reply(message.text)

bot.run()

Create a bot token with @botfather in Bale, then replace TOKEN.

Features (MVP)

  • Async-first API over https://tapi.bale.ai
  • Unified bot.api for handlers and Bot API methods
  • Long polling via bot.run()
  • Commands, messages, and callback queries
  • Reply helpers on Message and CallbackQuery

Docs

Official Bale Bot API: https://docs.bale.ai/

License

MIT

Download files

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

Source Distribution

baleon-0.0.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

baleon-0.0.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file baleon-0.0.1.tar.gz.

File metadata

  • Download URL: baleon-0.0.1.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for baleon-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bd38b96ca5bf5da54bb09707ff3bf8236e75dbc701ad3548d00f3b382ed7f768
MD5 6341210e88f5869dfd45401ca772ad02
BLAKE2b-256 dffe2306e9056aa1768394570ec9e884663257ae557f914bc0a27b10a6ca69bb

See more details on using hashes here.

File details

Details for the file baleon-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: baleon-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for baleon-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25fe812fb620560ab701a0a6f738bce535c3cc59c2e5b2109775b9a4bed9fedb
MD5 4a32d483d8c15e1dad7040a502447dc3
BLAKE2b-256 6401bce4290f3247fe92d5c80c5143652a2c026bf009e68deb29eedf2b6b47e9

See more details on using hashes here.

Supported by

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