Skip to main content

Feature-based Aiogram framework library — reusable infrastructure for Telegram bots

Project description

Codex Bot Framework

PyPI version Python versions License: MIT

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 GarbageStateRegistry and 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


📄 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


Download files

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

Source Distribution

codex_bot-0.1.1.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

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

codex_bot-0.1.1-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file codex_bot-0.1.1.tar.gz.

File metadata

  • Download URL: codex_bot-0.1.1.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_bot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c84c7ae8f985a27b20497f09eff4804f668a6d9d379ad9c75990fe2305c13ee
MD5 13eb68b4482c296db79aae277c05d756
BLAKE2b-256 5ae508fde3a618a868d4772fcfbd1979cb128a67db8d140c52fdf80c196e3799

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_bot-0.1.1.tar.gz:

Publisher: publish.yml on CodexDLC/codex-bot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_bot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: codex_bot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_bot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bc2b97bd880116a0e7c1ae1a69bef539a64b2bdfc52e2c962c17f147a3308d5
MD5 38d0325d27cd8810515d6fe21ca5d977
BLAKE2b-256 d448e3ad9885dce94e76e0940f80c0dc6239f8b2550feb5ce2b4bb769cb50fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_bot-0.1.1-py3-none-any.whl:

Publisher: publish.yml on CodexDLC/codex-bot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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