Skip to main content

easyaiogram

🚀 easyaiogram is a lightweight and beginner-friendly wrapper built on top of Aiogram 3.x.

It helps you create Telegram bots faster with clean decorators, simple keyboard helpers, callback handlers, and less boilerplate code.


✨ Features

  • ⚡ Easy bot initialization
  • 🧩 Command handlers
  • 💬 Text handlers
  • 🔎 Contains text handlers
  • 🧪 Regex handlers
  • 🔘 Callback query handlers
  • ⌨️ Reply keyboard generator
  • 📲 Inline keyboard generator
  • 📤 Message, photo, and document helpers
  • 🚀 Simple start() and run() methods

📦 Installation

pip install easyaiogram

🚀 Quick Start

from easyaiogram import EasyAiogram
from aiogram.types import Message, CallbackQuery

bot = EasyAiogram(token="YOUR_BOT_TOKEN")

menu = bot.make_buttons(["Features", "GitHub", "Support"], row_width=2)
inline_menu = bot.make_inline_buttons(["Profile", "Settings", "Help"], row_width=2)

@bot.on_command("start")
async def start(message: Message):
    await message.answer("Welcome to easyaiogram!", reply_markup=menu)

@bot.on_text("features")
async def features(message: Message):
    await message.answer("easyaiogram makes Aiogram easier and cleaner.")

@bot.on_contains("help")
async def help_handler(message: Message):
    await message.answer("How can I help you?")

@bot.on_regex(r"^\d+$")
async def number_handler(message: Message):
    await message.answer("You sent a number.")

@bot.on_callback("btn:1")
async def profile_callback(callback: CallbackQuery):
    await callback.answer("Profile clicked!")

if __name__ == "__main__":
    bot.start()

🧠 Usage

Create Bot

from easyaiogram import EasyAiogram

bot = EasyAiogram(token="YOUR_BOT_TOKEN")

Command Handler

@bot.on_command("start")
async def start(message):
    await message.answer("Hello!")

Text Handler

@bot.on_text("hello")
async def hello(message):
    await message.answer("Hi!")

Contains Handler

@bot.on_contains("help")
async def help_handler(message):
    await message.answer("How can I help you?")

Regex Handler

@bot.on_regex(r"^\d+$")
async def number_handler(message):
    await message.answer("You sent a number.")

Callback Handler

@bot.on_callback("btn:1")
async def callback_handler(callback):
    await callback.answer("Button clicked!")

⌨️ Reply Keyboard

menu = bot.make_buttons(
    ["Profile", "Settings", "Help"],
    row_width=2
)

await message.answer("Choose:", reply_markup=menu)

🔘 Inline Keyboard

inline_menu = bot.make_inline_buttons(
    ["Profile", "Settings", "Help"],
    row_width=2
)

await message.answer("Choose:", reply_markup=inline_menu)

Default callback data:

btn:1
btn:2
btn:3

Custom callback prefix:

inline_menu = bot.make_inline_buttons(
    ["Profile", "Settings", "Help"],
    row_width=2,
    callback_prefix="menu"
)

Generated callback data:

menu:1
menu:2
menu:3

📤 Helper Methods

await bot.send(chat_id, "Hello!")
await bot.answer(message, "Hello!")
await bot.reply(message, "Reply text")
await bot.edit_callback(callback, "Updated text")
await bot.send_photo(chat_id, photo="photo_url")
await bot.send_document(chat_id, document="file_url")

▶️ Start Bot

bot.start()

or:

bot.run()

🔥 Why easyaiogram?

Standard Aiogram requires more setup:

import asyncio
from aiogram import Bot, Dispatcher

bot = Bot("TOKEN")
dp = Dispatcher()

async def main():
    await dp.start_polling(bot)

asyncio.run(main())

With easyaiogram:

from easyaiogram import EasyAiogram

bot = EasyAiogram("TOKEN")
bot.start()

📌 Requirements

  • Python 3.10+
  • Aiogram 3.x

📄 License

MIT License


Made with ❤️ for Python and Telegram bot developers.

Metadata

Release files for easy-aiogram-bot 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easy-aiogram-bot 1.2.1
File Size Uploaded Provenance Actions
easy_aiogram_bot-1.2.1.tar.gz 4.2 kB Without provenance Details for easy_aiogram_bot-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easy-aiogram-bot 1.2.1
File Interpreter ABI Platform Actions
easy_aiogram_bot-1.2.1-py3-none-any.whl Python 3 none any Details for easy_aiogram_bot-1.2.1-py3-none-any.whl

Total release size: 8.6 kB

Release files / easy_aiogram_bot-1.2.1.tar.gz

Download URL easy_aiogram_bot-1.2.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
44cafdde91cdc00ce3b7e4d28b07e4c04d379c3ddf3ba2a3534b579e70b25fd4
BLAKE2b-256 checksum
How to use checksums
cde792d6913ced57f39b8cf924fa0beaa622478d6b2a8508ca1b73e73dc8ba66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / easy_aiogram_bot-1.2.1-py3-none-any.whl

Download URL easy_aiogram_bot-1.2.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fddc13836e45b7dd668f3d4f83c1f552c004c2bcf70779d23dec1200f7d9ca0f
BLAKE2b-256 checksum
How to use checksums
8080cbd96b9b956238c507d6832c64e748e1cbbc28cbc4867aab67e05d8984b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for easy-aiogram-bot 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page