π¦ Thatβs Raito!ΒΆ
REPL, hot-reload, keyboards, pagination, and internal dev tools β all in one.
FeaturesΒΆ
Hot Reload β automatic router loading and file watching for instant development cycles
Role System β pre-configured roles (owner, support, tester, etc) and selector UI
Pagination β easy pagination over text and media using inline buttons
FSM Toolkit β interactive confirmations, questionnaires, and mockable message flow
CLI Generator β
$ raito initcreates a ready-to-use bot template in secondsKeyboard Factory β static and dynamic generation
Command Registration β automatic setup of bot commands with descriptions for each
Album Support β groups media albums and passes them to handlers
Rate Limiting β apply global or per-command throttling via decorators or middleware
Database Storages β optional JSON & SQL support
REPL β execute async Python in context (
_msg,_user,_raito)Params Parser β extracts and validates command arguments
Logging Formatter β beautiful, readable logs out of the box
Metrics β inspect memory usage, uptime, and caching stats
π Quick StartΒΆ
import asyncio
from aiogram import Bot, Dispatcher
from raito import Raito
async def main() -> None:
bot = Bot(token="TOKEN")
dispatcher = Dispatcher()
raito = Raito(dispatcher, "src/handlers")
await raito.setup()
await dispatcher.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())