pinger-bot
Discord bot to get status from (and collect statistics of) Minecraft servers, which is my first ever created project, that lived more than a few days. I often test here new tools or even architectures.
As it was written in the sidebar, I enjoy connecting a lot of different new technologies into one,
small on the first look, project.
This one is not an exception, I actually got my first experience with i18n (translation of the app) here.
There is also used APScheduler (although I now prefer a simpler solution,
like while True: loop in the background with calling my function and asyncio.sleep (async is gorgeous in Python btw)).
You can also notice that I used fairly complex and powerful library SQLAlchemy (ORM version) (and alembic for something called migrations - automatic DB updates without any loss of data and manual intervention during adding a new table or even a row into already existing table). I also used an advantage of these libraries, and the bot supports all three popular SQL databases (SQLite, MySQL and PostgreSQL), even CI tests all possible combinations of ~4 supported different Python versions and DBs.
Technologies that I have used here:
- Hikari-py - library for connecting to Discord. Similar to discord.py, but different.
- APScheduler - for scheduling execution of a function. Here it is used to collect statistics once in a while.
- mcstatus - for getting data from servers (I'm a maintainer of this library now).
- SQLAlchemy ORM - for connecting to the database (I currently support SQLite, MySQL and PostgreSQL).
- alembic - for database migrations.
- matplotlib - for creating statistics graphs.
- gettext - for translating into different languages (i18n).
- Babel - for helping in translating. It adds a bit of tooling to e.g. fetch strings for translations.
- Docker - for running on my server.