Skip to main content

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 mcstats instead, where you can ping a server without the query protocol.

Install


Install via pip

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

Install from source

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

python setup.py build 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.

Example:

$ mcquery play.lbsg.net
Motd: None
Hostname: {-name-:-Lifeboat Proxy-,-node-:{-type-:-PROXY-,-ip-:-proxy14.lbsg.net-,-players-:91,-maxplayers-:400,-tps-:39.950001}}
Game type: None
Game id: None
Version: None
Server engine: None
Plugins: ['']
Map: None
Num players: 91
Max players: 400
Whitelist: None
Host ip: **.***.**.**
Host port: 19132
Players: []

You can also specify the port with the -p option (e.g.: 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 object
    print(data)

License


MIT © 2017-2021 w-gao

Metadata

Release files for mcquery 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcquery 0.1.0
File Size Uploaded
mcquery-0.1.0.tar.gz 4.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mcquery 0.1.0
File Interpreter ABI Platform
mcquery-0.1.0-py3.8.egg Legacy Egg format - - Details
mcquery-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / mcquery-0.1.0.tar.gz

Download URL mcquery-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f02e530db3b247c2f736828811c901b3c1a946225a9fc8e6d98e4994870bd20a
BLAKE2b-256 checksum
How to use checksums
fb6e281a749fda13b0e6cc0845fd1881fc1f65948e64a369038b8c32d8ebfee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

Release files / mcquery-0.1.0-py3.8.egg

Download URL mcquery-0.1.0-py3.8.egg
Size 4.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
b58b49b26c46409fff964b350e58d184b1c79f5c21e870818985769506dd77df
BLAKE2b-256 checksum
How to use checksums
92f009aa6f02d44f452f4751473b4880d6b385142d47eefda4a704cf0ea3e60c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

Release files / mcquery-0.1.0-py3-none-any.whl

Download URL mcquery-0.1.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f5651013b917277cad2508787fe2dce96c528dbbd46788c69c3ae8c42ea27bd
BLAKE2b-256 checksum
How to use checksums
7451e3201d1fa5f6a591d5684e5f57f3b338ac05be467e954628537a33542222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

3 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page