Feature-based Aiogram framework library — reusable infrastructure for Telegram bots
Project description
Codex Bot Framework
Codex Bot is a professional, feature-based framework built on top of Aiogram 3.x. It provides a reusable, production-ready infrastructure for building complex, scalable Telegram bots with a focus on stateless UI management and high-load Redis integration.
🚀 Key Features
- Feature-based Architecture: Organize your bot into independent, reusable features.
- Stateless Orchestrators: Manage UI logic without storing state in memory, making your bot horizontally scalable.
- Redis Stream Integration: Native support for high-load event processing with Consumer Groups.
- Advanced FSM: Automatic UI cleanup with
GarbageStateRegistryand structured state management. - Unified View System: Consistent message rendering across different platforms using DTOs.
- Fluent-based I18n: Powerful localization engine with project-level isolation and automatic compilation.
- CLI Scaffolding: Rapidly generate new features with pre-defined templates.
📦 Installation
Install the core library:
pip install codex-bot
Install with optional dependencies:
pip install "codex-bot[redis,i18n,http]"
🛠 Quick Start
from codex_bot import BotBuilder, BaseBotOrchestrator, Director
from codex_bot.base.view_dto import ViewResultDTO
# 1. Define your feature orchestrator
class MyFeatureOrchestrator(BaseBotOrchestrator[None]):
async def render_content(self, payload: None, director: Director) -> ViewResultDTO:
return ViewResultDTO(text="Hello from Codex Bot!")
# 2. Build and run your bot
builder = BotBuilder(token="YOUR_TELEGRAM_TOKEN")
builder.register_orchestrator("main", MyFeatureOrchestrator())
builder.run_polling()
📚 Documentation
- English Documentation
- Русская документация
- Changelog — see what's new in the latest versions.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🇷🇺 Краткое описание (RU)
Codex Bot — это профессиональный фреймворк для создания Telegram-ботов на базе Aiogram 3.x. Он предоставляет готовую инфраструктуру для разработки сложных и масштабируемых систем, используя архитектуру на основе "фич", stateless-оркестраторы и глубокую интеграцию с Redis Streams.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codex_bot-0.1.0.tar.gz.
File metadata
- Download URL: codex_bot-0.1.0.tar.gz
- Upload date:
- Size: 68.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa5ca1e8bf1a547f743889b73cb7810b5cc002dce9252641f8509af7d69fd91d
|
|
| MD5 |
e14ebefd58b9b0172e7b3ceec2736866
|
|
| BLAKE2b-256 |
fba15d43a8866825d2143eac929ee22f2ab12981f9efbfe3d39837e5f0eb4e2a
|
File details
Details for the file codex_bot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codex_bot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 58.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bc62c0599af56a24efc676235360025d9c9b39b5089fd95ffacea552a8e9d9d
|
|
| MD5 |
8c021114a2e092171ea561b5e2495597
|
|
| BLAKE2b-256 |
488a4f8162979f6aef53eb83a0e569ec2c8f7b519dc8e46b66b590fdc8f875a4
|