Metadata-Version: 2.4
Name: codex-bot
Version: 0.1.1
Summary: Feature-based Aiogram framework library — reusable infrastructure for Telegram bots
Project-URL: Homepage, https://github.com/codexdlc/codex-bot
Project-URL: Documentation, https://codexdlc.github.io/codex-bot/
Project-URL: Repository, https://github.com/codexdlc/codex-bot
Project-URL: Changelog, https://github.com/codexdlc/codex-bot/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/codexdlc/codex-bot/issues
Author: Codex Team
License: MIT
License-File: LICENSE
Keywords: aiogram,bot,framework,telegram
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.12
Requires-Dist: aiogram<4.0,>=3.4
Requires-Dist: pydantic<3.0,>=2.0
Provides-Extra: all
Requires-Dist: aiogram-i18n>=1.4; extra == 'all'
Requires-Dist: arq>=0.25; extra == 'all'
Requires-Dist: httpx<1.0,>=0.27; extra == 'all'
Requires-Dist: redis[asyncio]<6.0,>=5.0; extra == 'all'
Provides-Extra: arq
Requires-Dist: arq>=0.25; extra == 'arq'
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.24; extra == 'docs'
Provides-Extra: http
Requires-Dist: httpx<1.0,>=0.27; extra == 'http'
Provides-Extra: i18n
Requires-Dist: aiogram-i18n>=1.4; extra == 'i18n'
Provides-Extra: redis
Requires-Dist: redis[asyncio]<6.0,>=5.0; extra == 'redis'
Description-Content-Type: text/markdown

# Codex Bot Framework

[![PyPI version](https://img.shields.io/pypi/v/codex-bot.svg)](https://pypi.org/project/codex-bot/)
[![Python versions](https://img.shields.io/pypi/pyversions/codex-bot.svg)](https://pypi.org/project/codex-bot/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Codex Bot** is a professional, feature-based framework built on top of [Aiogram 3.x](https://github.com/aiogram/aiogram). 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:
```bash
pip install codex-bot
```

Install with optional dependencies:
```bash
pip install "codex-bot[redis,i18n,http]"
```

---

## 🛠 Quick Start

```python
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](https://codexdlc.github.io/codex-bot/en_EN/)
- [Русская документация](https://codexdlc.github.io/codex-bot/ru_RU/)
- [**Changelog**](CHANGELOG.md) — see what's new in the latest versions.

---

## 📄 License

This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.

---

### 🇷🇺 Краткое описание (RU)
**Codex Bot** — это профессиональный фреймворк для создания Telegram-ботов на базе Aiogram 3.x. Он предоставляет готовую инфраструктуру для разработки сложных и масштабируемых систем, используя архитектуру на основе "фич", stateless-оркестраторы и глубокую интеграцию с Redis Streams.
