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-0.1.1.tar.gz
(7.6 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-0.1.1.tar.gz.
File metadata
- Download URL: mcstatusio-0.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d68167155931b86f5962575f32f32b42598a2f50333f821547b79067a9424ed
|
|
| MD5 |
9cf5108f3bbcdb5c5ddcc2d72ee4718c
|
|
| BLAKE2b-256 |
6acf5569bfef9c18259e1a44f300cacb3db329d4b2c4fa9b21745b9bf7f46045
|
File details
Details for the file mcstatusio-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcstatusio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a66316dd3c29875e8f8c7db339a44d7df9843ca6cb24e667295853457b9153
|
|
| MD5 |
5dc8382eaee09768876329a56195c09d
|
|
| BLAKE2b-256 |
6355d3f01e688a4fefc37ea913f97ca674aa905e14485b37293f0d93a1bc8b16
|