mcstatus
Python library to ping and get status from Minecraft servers. It doesn't just return you ok or not ok, you can also get the server icon, description, player count, etc. Interesting that this library is mostly used by Discord bot developers (even I found this library because I wanted a Discord bot for my Minecraft server, what a perfect use case).
I have been a core maintainer of the library for almost a year now and have added a lot of new stuff there. One of my biggest contributions was the first one. I rewrote the entire system of interaction between the library and users using dataclasses (if you are not familiar with what it is, it is just a simpler, faster way to write simple classes that only store data; much nicer and typed than dicts; everyone should try it). Since this rewrite took a lot of time, it so happened that I made many other contributions to this library and became a maintainer!
And one more interesting fact: the library was created by Dinnerbone, who is a technical director at Mojang Studios now, 13 years ago.
Features of the library made by me:
- New fancy dataclasses as return values, instead of 10-year-old unpythonic nested classes. (#306)
- Completely new parsing system for server description (MOTD). Before, you could only get a string of it with some Minecraft color codes, and now you can transform it to anything! As an example, we implemented 24bit ANSI transformer and HTML transformer. (#335)
- Documentation that describes every public (and not only) method, as well as examples of how to use it and FAQ. Can you imagine that before like a year ago, this library didn't have any docs and we (maintainers) suggested that users read source code to know how to use a library? (#477)
- Using the
withblock to open and close connections (#422). - And about 60 other PRs that are not important enough to mention here.
Technologies that are used here:
- dnspython - for DNS SRV record lookup
- pyright - linter for supporting statically typed Python. Was chosen instead of mypy because it was faster, not true anymore though. See this document if you are interested in how it is different from mypy, this GitHub issue to read why we don't use mypy and this page to know what is typed Python.
- And a few more features like poetry (I mean, it is a standard for all my projects now), poetry-dynamic-versioning to control package version with git tags, instead of just committing
Bump versionbefore every release. I won't go into details much, because I wasn't really involved in those decisions. It was done before I became a maintainer.