A supercharged, production-ready template for building scalable Telegram bots with all the bells and whistles!
- π€ Aiogram 3 - Built with aiogram for elegant bot handlers
- β‘ FastAPI Integration - Lightning-fast API endpoints with automatic OpenAPI docs
- π₯ Webhook Support - Production-ready webhook handling for reliable bot updates
- ποΈ Database Ready - Pre-configured database integration with Tortoise ORM
- π‘ Redis Support - Built-in Redis for caching and real-time data handling
- π i18n Support - Multi-language support using Babel
- π Environment Management - Secure configuration using Pydantic settings
- π Logging & Monitoring - Comprehensive logging setup with rotating file handlers
- π³ Docker Support - Containerized for easy deployment and scaling
- π§ͺ Health Checks - Built-in health check endpoints for monitoring
- FastAPI - Modern API framework
- aiogram - Powerful Telegram Bot framework
- Tortoise ORM - Easy async ORM for Python
- Redis - In-memory data store
- Babel - Internationalization framework
- Docker - Containerization
- Poetry - Dependency management
- Clone the repository:
git clone https://github.com/verybigsad/telegram-bot-template.git- Install dependencies:
poetry install- Set up your environment variables:
cp app/.env.example app/.env- Run the bot in polling mode:
python start-polling.pysoon to be here π
app/
βββ api/ # FastAPI routes and schemas
βββ core/ # Core functionality
β βββ db/ # Database models and config
β βββ redis/ # Redis integration
βββ locales/ # Locales for i18n
βββ bot/ # Telegram bot handlers and logic
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Give a βοΈ if this project helped you!
Built with β€οΈ and β by verybigsad.