skillfed

aiogram

Modern and fully asynchronous framework for Telegram Bot API

aiogram v3.30.0 4.0M downloads/30d#2,394 on PyPI5,829
Permissive license MIT Active released

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 aiogram

uv

uv add aiogram

poetry

poetry add aiogram

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: AsyncIOIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: PyPyTopic :: Communications :: ChatTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

telegram bot framework pythonasync telegram bot libraryasyncio telegram api wrapperpython telegram bot developmenttelegram bot routing middlewaretelegram bot state machine
telegram-botasynciostate-machine

More Python Modules packages