- Python 3.11+
- Poetry
- PostgreSQL or MySQL
- Redis (Optional)
make install
make install-dev
- Copy file
.env.example
and rename it to .env - Open it and configure it
- If you used Redis find
REDIS_USE
and set True
# Redis settings
REDIS_USE=True
poetry add asyncpg
poetry add asyncmy
Default database - PostgreSQL
. You can change this in .env DB_USED
For migrations using Alembic
make migration message=message
make migrate
make start
- Flexible choice between
PostgreSQL
andMySQL
- In
bot/middlewares/
there are already several middlewares in the folder(ThrottlingMiddleware) - In
bot/filters
there are already several middlewares in the folder(IsAdmin) DailyRotatingFileHandler
- logs are written to a file with the current date from 00:00 to 23:59 and stored in thelogs
folderTelegramHandler
- logs are sent to the telegram chat
- Aiogram 3.x (Telegram bot framework)
- SQLAlchemy (working with database from Python)
- Alembic (lightweight database migration tool)
- Redis (Optional)