Skip to main content

The unofficial python library for interacting with the mcstatus.io API.

Project description

Python MCStatus

PyPI - Version PyPI - Python Version Hatch project


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

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


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.1.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

python_mcstatus-0.0.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page