pytmbot

pytmbot

pyTMbot

A simple Telegram bot to handle Docker containers and images, also providing basic information about the status of local servers. The bot operates synchronously. It does not use webhooks.

Security Rating Vulnerabilities Quality Gate Status Bugs Maintainability Rating Code Smells Duplicated Lines (%) Codacy Badge Production Docker CI

The bot was written using the pyTelegramBotAPI. Use psutil and docker-py libraries for gather information.

🐳 A large section on Docker

πŸ’‘ Features

πŸ”– Additionally:

Screenshots are available here: screenshots.md.

πŸ•Έ Requirements

Initially, I designed the bot to run only inside a Docker container. However, this method has some limitations, so from version 0.9.0 onward, it is possible to install the bot locally outside the container. At the same time, the bot will still be able to function and receive information about Docker containers.

Full list of Python dependencies see in requirements.txt. List of Python dependencies for self setup bot see in setup_req.txt

πŸ”Œ Installation, setup and run bot

πŸ›‘ Secure

An authorization mechanism has been built into the pyTMbot management system. To describe the principle of its operation in the most concise way, we can say the following:

In the alpine-dev build (and the next release 0.1.2), this mechanism has been expanded:

For stable version, failed attempts to authorize are logged with an ERRORflag.

πŸ’’ Supported commands

In addition to button navigation, the bot also supports commands. Below is a list of commands and their details:

# Command Keyboard button Note
1 /start None -
2 /help None -
3 /docker 🐳 Docker -
4 /containers 🧰 Containers Button available in the Docker section
5 /images πŸ–ΌοΈ Images Button available in the Docker section
6 /back πŸ”™ Back to main menu Button available in the Docker section
7 /check_bot_updates None -

🌲 Bot tree

πŸ“ˆ Roadmap

πŸ‹ pyTMbot on Docker Hub

GitHub Release Docker Pulls Docker Image Size Github last-commit

🧬 Authors

πŸš€ About Me

I am a novice Python developer. This is my first publicly available project in this great programming language.

πŸ“œ License

MIT License