Skip to main content

Query tool for Minecraft: Bedrock Edition servers.

Project description

mcquery

PyPI

Introduction


mcquery (aka py-mcpe-query) is a Python software that uses the query protocol to ping a Minecraft: Bedrock edition server for basic information. Note: If you get a timeout error, it might be that the target server do not support the query protocol. If that happens, you can use py-mcpe-stats where you can ping a server without the query protocol.

Install


Install via pip

Run pip install mcquery in your terminal, and it will download the latest version of this project.

Install from source

Clone this repository and run the following in the root folder of this project:

python setup.py build
python setup.py install

Usage


Query with CLI

After installation, the mcquery command will be available in your Python environment. You can perform a query with the following command: mcquery localhost.

You can also provide the port with the -p option as such mcquery localhost -p 19133. For more options, please run mcquery --help.

Use as a module

You can also use the API by writing the following code in your project:

from mcquery import mcquery

host = "localhost"
port = 19132

with mcquery(host, port=port, timeout=10) as data:
    # data is a QueryServerData instance
    print(data)

License


MIT © 2017-2021 w-gao

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

mcquery-0.0.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

mcquery-0.0.2-py3-none-any.whl (5.5 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