Python Telegram Bot Bootstrap

JM Robles
3 min readAug 16, 2022

TL;DR: This bootstrap enables the easy telegram bot developing in Python with production-grade features.

3, 2, 1… Telegram bot in the moon!

Motivation

Telegram rules. It’s the king if we take in count the number of features… and its awesome bot skills.

I used telegram bots for multiple scenarios: alarm notification, scrapping control, automation tools, …

I find python-telegram-bot library for Python very good.

Telegram exposes a REST API for its bots platforms. It’s a great API but its documentation is a bit ugly.

python-telegram-bot wraps the API and it’s pretty straightforward to create a bot with it… but in my humble opinion, it’s slightly complicated to create a production grade bot.

That is the reason for creating a Python bootstrap project with interesting and very used features: github.com/jmrobles/telegram-bot-bootstrap

Features

The features included since the very moment that you clone the repository are:

  • Dependency injection: You can easy inject dependencies for your bot.
  • Clean Architecture: Approach to a clean architecture.
  • Internationalization (i18n) support: gettext locale ready.
  • Persistence with

--

--

JM Robles

AIOps @ Montevive.ai / Backend / Platform engineer #llm #rag #llamaindex #langchain #go #python #kubernetes #terraform #devops