mcquery
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcquery-0.1.0.tar.gz | 4.9 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|
Security for mcquery 0.1.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.