The unofficial python library for interacting with the mcstatus.io API.
Project description
Python MCStatus
Python MCStatus is a library which wraps around the mcstatus.io API. It is developed very similar to the node-mcstatus npm package. It's essentially the same just ported to python.
Table of Contents
Installation
To install this package open your terminal for your workspace and use the following command:
pip install python-mcstatus
Usage
Java Status
from python_mcstatus import JavaStatusResponse, statusJava
host = 'demo.mcstatus.io'
port = 25565
query = True
response: JavaStatusResponse = statusJava(host, port, query) # port is optional and defaults to 25565
# You can receive and error in the above when the response is not 200, this copies the functionality from the node library.
Bedrock Status
from python_mcstatus import BedrockStatusResponse, statusBedrock
host = 'demo.mcstatus.io'
port = 19132
response: BedrockStatusResponse = statusBedrock(host, port) # port argument is optional and defaults to 19132
License
python-mcstatus
is distributed under the terms of the MIT license.
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
python_mcstatus-0.0.2.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for python_mcstatus-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 000a643ea3d68138a3c439daf566570a6d6ea1db95e54f324471fa0a52e5b738 |
|
MD5 | 725e2da57e09bd5a1b824f5b3092a507 |
|
BLAKE2b-256 | e7a3255b0b31349eae62b195523dc454f9c88f67dae3220f10a4211ecc76c03c |