mcclient-lib
A lightweight Minecraft client for querying the status data of a Minecraft server.
Supported Minecraft versions
- Minecraft Java (v1.4.0 and later)
- Minecraft Bedrock
Supported protocols
- Server List Ping for Minecraft Java servers
- Legacy Server List Ping for Minecraft Java servers before 1.4
- Query Protocol for Minecraft Java servers (needs to be enabled on the server)
- Bedrock Server List Ping for Minecraft Bedrock servers
Installation
pip install mcclient-lib
Usage
Server List Ping
from mcclient import SLPClient
# for Minecraft Java servers from version 1.7 and later
slp_client = SLPClient("mc.example.com")
res = slp_client.get_status()
Query
from mcclient import QueryClient
# for Minecraft Java servers (needs to be enabled on the server)
query_client = QueryClient("mc.example.com")
res = query_client.get_status()
Bedrock Server List Ping
from mcclient import BedrockSLPClient
# for Minecraft Bedrock servers
bedrock_slp_client = BedrockSLPClient("mc.example.com")
res = bedrock_slp_client.get_status()
Response
print(f"motd: {res.motd}")
print(f"online players: {res.players.online}")
print(f"max players: {res.players.max}")
print(f"players list: {res.players.list}")
print(f"version: {res.version.name}")
print(f"protocol version: {res.version.protocol}")
print(f"host: {res.host}")
print(f"port: {res.port}")
print(f"timestamp: {res.timestamp}")
print(f"favicon: {res.favicon is not None}")
# only for query and Bedrock responses
print(f"gametype: {res.gametype}")
print(f"map: {res.map}")
# only for query responses
print(f"plugins: {res.plugins}")
print(f"host ip: {res.hostip}")
print(f"host port: {res.hostport}")
# only for bedrock responses
print(f"server id: {res.server_id}")
Note that not every field is queryable with every protocol.
Metadata
Release files for mcclient-lib 1.2.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 | Provenance | Actions |
|---|---|---|---|---|
| mcclient_lib-1.2.0.tar.gz | 13.3 kB | Without provenance | Details for mcclient_lib-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcclient_lib-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for mcclient_lib-1.2.0-py3-none-any.whl |
Total release size: 25.3 kB
Release files / mcclient_lib-1.2.0.tar.gz
| Download URL | mcclient_lib-1.2.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf182058c0f31544c00f18fb99b1ea7935a9324e276273fffe19f8426111e220
|
|
BLAKE2b-256 checksum How to use checksums |
b329dcbfb87c40fb97a0c3176daa37699470d92d08404f5ef41e043ab72609b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Release files / mcclient_lib-1.2.0-py3-none-any.whl
| Download URL | mcclient_lib-1.2.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e32456bb31c0ed3b448f33d6f06debbf2016a2558be1c00a1ddefa9422bdb4b1
|
|
BLAKE2b-256 checksum How to use checksums |
ab28e1d56934c352f764770b56473465292c00919eba00cd800820c7f140d0b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Security for mcclient-lib 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.