Awesome Open Source
Awesome Open Source


Financial Contributors on Open Collective [Telegram] aiogram live PyPi Package Version PyPi status Downloads Supported python versions Telegram Bot API Documentation Status Github issues MIT License

aiogram is a pretty simple and fully asynchronous framework for Telegram Bot API written in Python 3.7 with asyncio and aiohttp. It helps you to make your bots faster and simpler.


📚 Click to see some basic examples

Few steps before getting started...

  • First, you should obtain token for your bot from BotFather.
  • Install latest stable version of aiogram, simply running pip install aiogram

Simple getMe request

import asyncio
from aiogram import Bot


async def main():
    bot = Bot(token=BOT_TOKEN)

        me = await bot.get_me()
        print(f"🤖 Hello, I'm {me.first_name}.\nHave a nice Day!")
        await bot.close()

Poll BotAPI for updates and process updates

import asyncio
from aiogram import Bot, Dispatcher, types


async def start_handler(event: types.Message):
    await event.answer(
        f"Hello, {event.from_user.get_mention(as_html=True)} 👋!",

async def main():
    bot = Bot(token=BOT_TOKEN)
        disp = Dispatcher(bot=bot)
        disp.register_message_handler(start_handler, commands={"start", "restart"})
        await disp.start_polling()
        await bot.close()


You can find more examples in examples/ directory

Official aiogram resources:


Code Contributors

This project exists thanks to all the people who contribute. [Code of conduct].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]



Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (806,773
Telegram (11,892
Telegram Bot (5,831
Pretty (3,020
Asyncio (2,534
Aiohttp (934
Telegram Bot Api (850
Bot Framework (842
Aiogram (124