Skip to main content

Platform-agnostic framework for building chat bots.

Project description

Botio

Botio is a platform-agnostic framework for building chat bots.

The goal of Botio is simple: write your bot logic once and run it on multiple messaging platforms without rewriting your handlers for each platform.

Why Botio?

Building bots for different platforms is often repetitive.

Every platform has its own:

  • Update structure
  • User model
  • Message format
  • Webhook payload
  • API methods

As a result, developers usually end up maintaining separate codebases for Telegram, Bale, Rubika, Eitaa, and other platforms.

Botio solves this problem by introducing a unified abstraction layer.

Instead of writing platform-specific code, you write your business logic against a common interface.

Philosophy

Your bot should not care where a message came from.

This:

if platform == "telegram":
    ...
elif platform == "rubika":
    ...
elif platform == "bale":
    ...

should not exist inside your handlers.

Instead, Botio normalizes incoming updates into a unified structure.

Platform Payload
        ↓
Adapter
        ↓
Update
        ↓
Context
        ↓
Handler
        ↓
Response
        ↓
Adapter
        ↓
Platform API

Your handlers receive a platform-independent context and can focus entirely on business logic.

Features

  • Platform-independent bot architecture
  • Unified Update model
  • Unified User, Chat and Message models
  • Adapter-based design
  • Async-first architecture
  • Extensible platform support
  • Framework agnostic
  • Simple handler registration

Current Status

Botio is currently in its early stages of development.

The project is focused on building a clean foundation that can support multiple messaging platforms through adapters.

Supported and planned platforms include:

  • Telegram
  • Bale
  • Rubika
  • Eitaa
  • WhatsApp
  • Discord
  • Custom adapters

Installation

pip install botio

Quick Start

from botio import BotKit

bot = BotKit()

bot.add(
    platform="telegram",
    token="YOUR_TOKEN",
)

@bot.message
async def echo(ctx):
    await ctx.reply(
        ctx.message.text
    )

Core Concepts

Update

A normalized representation of an incoming event.

Context

Provides access to the update and helper methods such as replying to messages.

Adapter

Responsible for translating platform-specific payloads into Botio updates and converting Botio responses back into platform API calls.

Dispatcher

Routes updates to the appropriate handlers.

Design Goals

  • Keep business logic platform independent
  • Hide platform-specific complexity
  • Keep the core lightweight
  • Avoid framework lock-in
  • Make adapters easy to build
  • Provide a consistent developer experience

Roadmap

  • Core architecture
  • Adapter system
  • Telegram adapter (MVP)
  • Command handlers
  • Middleware system
  • Filters
  • State management
  • Storage backends
  • Bale adapter
  • Rubika adapter
  • Eitaa adapter
  • Webhook utilities

Contributing

Contributions, ideas, bug reports, and pull requests are welcome.

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

botio-0.0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

botio-0.0.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file botio-0.0.3.tar.gz.

File metadata

  • Download URL: botio-0.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for botio-0.0.3.tar.gz
Algorithm Hash digest
SHA256 01c875bc6d6f511c507a078df45d641ea3ca25d256564334efb18a54368ad4db
MD5 ce84286042f8e18765a15140605973ac
BLAKE2b-256 f111045c5f841b460dbedf9c0556a6121da0751481f0bd03d3ccdaabf2172abd

See more details on using hashes here.

File details

Details for the file botio-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: botio-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for botio-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f98518bdeba5af6bf02e9bba7bbf35dec8aceab4ea628e72a0f24fe44819265d
MD5 96e607fd274e246e8c2968bc0c2b1cc9
BLAKE2b-256 addd62bda1f04a4a54c6837d8ab3acf6ae8f70744b54bc9dec203c5ab424ad46

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 Pingdom Monitoring Sentry Error logging StatusPage Status page