mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
2 KiB
2 KiB
Project Overview: aiogram
Purpose
aiogram is a modern, fully asynchronous Python framework for the Telegram Bot API (currently supports Bot API 9.5+). It provides a high-level interface for building Telegram bots using asyncio.
Tech Stack
- Python: 3.10–3.14 (also supports PyPy)
- Async runtime: asyncio + aiohttp (HTTP client)
- Data validation: Pydantic v2
- Package manager:
uv - Linter/formatter:
ruff(check + format) - Type checker:
mypy - Testing:
pytestwithpytest-asyncio,aresponses - Docs: Sphinx (reStructuredText),
sphinx-autobuild - Changelog:
towncrier - Code generation:
butcher(aiogram-cli) — generates types, methods, enums from Bot API schema
Key Links
- Docs (English): https://docs.aiogram.dev/en/dev-3.x/
- GitHub: https://github.com/aiogram/aiogram/
- Bot API schema:
.butcher/schema/schema.json
Architecture Summary
The framework is layered:
aiogram/client/—Botclass (all API methods as shortcuts), session management, context controlleraiogram/types/— Pydantic models for all Telegram types (TelegramObjectbase)aiogram/methods/—TelegramMethod[ReturnType]subclasses, one per Bot API methodaiogram/dispatcher/— Dispatcher, Router (blueprints), middleware, event observersaiogram/filters/— Filter classes for routingaiogram/fsm/— Finite State Machine (states, storage backends)aiogram/enums/— Enumerations (ContentType, UpdateType, etc.)aiogram/utils/— Text decoration, keyboards, i18n, etc.aiogram/webhook/— Webhook server integrations (aiohttp, FastAPI, etc.).butcher/— Code generation inputs: YAML/JSON configs for types/methods/enums + Jinja2 templates
Optional extras
fast— uvloop + aiodnsredis— Redis FSM storagemongo— MongoDB FSM storageproxy— SOCKS proxy supporti18n— Babel-based i18ncli—butchercodegen CLIsignature— cryptographic signature verification