A Python wrapper for the mcstatus.io API.
Project description
MCStatusio
A Python wrapper for mcstatus API.
Installation
You can install the package via pip:
pip install mcstatusio
Usage
Bedrock Server Status
from mcstatusio import BedrockServer
server = BedrockServer("play.example.com", 19132)
status = server.status()
if not status.online:
print("The server is offline.")
else:
print(f"The server has {status.players.online} players online.")
Java Server Status
from mcstatusio import JavaServer
server = JavaServer("play.example.com", 25565)
status = server.status()
if not status.online:
print("The server is offline.")
else:
print(f"The server has {status.players.online} players online.")
Async Usage
Bedrock Server Status
import asyncio
from mcstatusio import BedrockServer
server = BedrockServer("play.example.com", 19132)
status = asyncio.run(server.async_status())
if not status.online:
print("The server is offline.")
else:
print(f"The server has {status.players.online} players online.")
Java Server Status
import asyncio
from mcstatusio import JavaServer
server = JavaServer("play.example.com", 25565)
status = asyncio.run(server.async_status())
if not status.online:
print("The server is offline.")
else:
print(f"The server has {status.players.online} players online.")
License
This project is licensed under the MIT License. See the LICENSE file for details
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcstatusio-1.0.0.tar.gz
(8.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcstatusio-1.0.0.tar.gz.
File metadata
- Download URL: mcstatusio-1.0.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e5e19604d6c5b86e83f6af165196d041f6d041d993d244ee6cadf09e7b736d
|
|
| MD5 |
d800eaaee11bfe4f5302342114b7bb16
|
|
| BLAKE2b-256 |
f6d301b9c8f5e3cec4db36c848fe419bd3d2500a35c269f97bbe9a337b87dfb2
|
File details
Details for the file mcstatusio-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mcstatusio-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf8673e201a880609c1c0df10ece1bb07949d1293fa7b3fb1a0f147481dcc7a
|
|
| MD5 |
751df904afc2d2ae82acea2ffe1b1971
|
|
| BLAKE2b-256 |
2b8d8298169fc49268d7648dc557c1173417b59dcefb22b27637b2881b4b200a
|