aiogram
Modern and fully asynchronous framework for Telegram Bot API
What it is and what it does
aiogram is a fully asynchronous framework for building Telegram bots in Python 3.10+, built on asyncio and aiohttp. It provides type hints (compatible with mypy), automatic Telegram Bot API integration code generation, routing via Blueprints, a Finite State Machine for conversation flow, powerful magic filters for message matching, middleware support for both incoming updates and API calls, and integrated internationalization via GNU Gettext or Fluent. The framework is designed to make bots faster and more powerful by leveraging Python's async capabilities.
The package depends on aiofiles, aiohttp, certifi, magic-filter, pydantic, and typing-extensions. It is actively maintained, supports current Python versions (3.10 through 3.14, including PyPy), and has no known security vulnerabilities. The documentation is available in multiple languages and the project maintains active community channels. Prior asyncio experience is strongly recommended before using aiogram.
Use it for:
- Build responsive Telegram bots that handle concurrent user interactions without blocking.
- Create stateful conversation flows using the built-in Finite State Machine for multi-step dialogs.
- Organize complex bot logic with Blueprints and routers for modular, maintainable code.
- Implement custom message filtering and routing with magic filters for flexible update handling.
- Integrate internationalization into bots with built-in I18n/L10n support.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
aiogram is an asynchronous Python framework for building Telegram bots using asyncio and aiohttp, with type hints, routing, state machines, and middleware support.
Yes. aiogram is production-stable, actively maintained, has low install friction, carries a permissive MIT license, and supports current Python versions. It is the right choice if you need to build asynchronous Telegram bots and have asyncio experience. No security vulnerabilities are known. The main prerequisite is comfort with async/await patterns.
Install
aiogram on PyPI
pip
pip install aiogramuv
uv add aiogrampoetry
poetry add aiogramInstalling aiogram
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a recent release (28 days old) and an active repository with 5829 stars. Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install aiogram
from aiogram import Bot, Dispatcher, types
from aiogram.filters import Command
import asyncio
bot = Bot(token="YOUR_BOT_TOKEN")
dp = Dispatcher()
@dp.message(Command("start"))
async def start_handler(message: types.Message):
await message.answer("Hello!")
async def main():
await dp.start_polling(bot)
asyncio.run(main())
Requires Python 3.10 or later and prior experience with asyncio; a valid Telegram Bot API token is needed to run bots.
Verify before relying
- Whether the autogenerated Telegram Bot API integration covers all endpoints in API version 10.2 or if manual updates are sometimes required.
- Performance characteristics and concurrency limits when handling high-volume update streams.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — aiofiles, aiohttp, certifi, magic-filter, pydantic, typing-extensions |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,037,693/month — #2,394 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiogram-3.30.0-py3-none-any.whl
Keywords: api, asyncio, bot, framework, telegram, wrapper
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyTelegramBotAPIA Python library that wraps the Telegram Bot…
copyleft · top 5,000 on PyPI
PyrogramPyrogram is an asynchronous Python framework…
copyleft · top 15,000 on PyPI
KurigramKurigram is an asynchronous Python framework…
copyleft · top 15,000 on PyPI
python-telegram-botProvides a pure Python asynchronous interface…
copyleft · top 1,000 on PyPI
nonebot2NoneBot2 is an asynchronous Python framework…
permissive · top 15,000 on PyPI
telebotA Telegram bot library with route-based message…
permissive · top 15,000 on PyPI
aiosignalProvides a Signal class for managing lists of…
permissive · top 100 on PyPI
botbuilder-integration-aiohttpIntegrates a Microsoft Bot Framework bot into…
permissive · top 15,000 on PyPI
TelethonTelethon is an asyncio-based Python library…
permissive · top 5,000 on PyPI
exteragram-alibProvides reactive state management, declarative…
permissive · top 15,000 on PyPI