mcping

Get statuses from Minecraft servers.
Difference between this and mcstatus
This package uses some classes and functions from mcstatus.
The primary goal of this package is to simply get the raw status without doing any other parsing.
Although mcstatus does provide a raw property to get the raw response,
there is no straightforward way to only get this response.
This results in time wasted doing processing that isn't needed for some applications.
A side effect of this is that there isn't any guarantee that the status response
will have all of the keys that it should, meaning you'll need to do some validation
before assuming that keys are present, or that they're the types you think.
In the situation that led me to make this package, this is completely fine.
Docs
Documentation is available at https://mcping.readthedocs.io.
Installation
If you want to use the library, install with pip:
pip install mcping
If you only want the CLI, pipx is recommended:
pipx install mcping
Use
Library
import mcping
# Synchronous
mcping.status('127.0.0.1')
# Asynchronous
async def main():
await mcping.async_status('127.0.0.1')
CLI
The package also includes a CLI to get server statuses.
It can be run from a cloned repo using the cli.py file:
python3 cli.py example.com
python3 cli.py example.com:25565
If the library is installed, the mcping script should also be installed and available globally:
mcping example.com
mcping example.com:25565
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Some code in mcping/__init__.py is modified from the mcstatus project's code,
licensed under the Apache License, Version 2.0.
Release files for mcping 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcping-0.3.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcping-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / mcping-0.3.0.tar.gz
| Download URL | mcping-0.3.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d77b3f15bee9eed8e9792e7dda8b0eaa707ac101f76bd57d9dad262ee1c27677
|
|
BLAKE2b-256 checksum How to use checksums |
5717f5fdc93c56648b777c23d75dd17be6b65368945c2add77d27bddecd02240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/6.4.9-100.fc37.x86_64
|
Release files / mcping-0.3.0-py3-none-any.whl
| Download URL | mcping-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e02b5d860a7b922c01c0a40503ebb416698dc388d2ab8148ec134c8c3055d592
|
|
BLAKE2b-256 checksum How to use checksums |
732a229fc0bb89e154dfbed814796a43cb2d4131177dcbbd3db37cc540dd6225
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/6.4.9-100.fc37.x86_64
|