Query tool for Minecraft: Bedrock Edition servers.
Project description
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
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
Built Distributions
File details
Details for the file mcquery-0.1.0.tar.gz
.
File metadata
- Download URL: mcquery-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f02e530db3b247c2f736828811c901b3c1a946225a9fc8e6d98e4994870bd20a |
|
MD5 | 7daea6305c1ab4de7a8e8810efab81a8 |
|
BLAKE2b-256 | fb6e281a749fda13b0e6cc0845fd1881fc1f65948e64a369038b8c32d8ebfee5 |
File details
Details for the file mcquery-0.1.0-py3.8.egg
.
File metadata
- Download URL: mcquery-0.1.0-py3.8.egg
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b58b49b26c46409fff964b350e58d184b1c79f5c21e870818985769506dd77df |
|
MD5 | 883d2489c472657121f9b4d2e2ebe624 |
|
BLAKE2b-256 | 92f009aa6f02d44f452f4751473b4880d6b385142d47eefda4a704cf0ea3e60c |
File details
Details for the file mcquery-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mcquery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5651013b917277cad2508787fe2dce96c528dbbd46788c69c3ae8c42ea27bd |
|
MD5 | 5e99db5bf178e411320fb2af0876da08 |
|
BLAKE2b-256 | 7451e3201d1fa5f6a591d5684e5f57f3b338ac05be467e954628537a33542222 |