An async API wrapper for the mcsrvstat.us API.
Project description
pymcsrvstatus
A simple async API wrapper for the mcsrvstat.us API.
Usage
from pymcsrvstatus import check_if_online, fetch, get_icon_url
import asyncio
if asyncio.run(check_if_online(address="hypixel.net", extra_user_agent="pymcsrvstatus example")):
print("Hypixel is online!")
else:
print("Hypixel is offline!")
status = asyncio.run(fetch(address="hypixel.net", extra_user_agent="pymcsrvstatus example"))
assert status.online is True
print(status.protocol) # Protocol(version=47, name="1.8.9")
print(status.version) # "Requires MC 1.8 / 1.21"
print(status.players) # Players(online=33812, max=200000, players=None)
print(get_icon_url(address="hypixel.net")) # https://api.mcsrvstat.us/icon/hypixel.net
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
pymcsrvstatus-1.0.1.tar.gz
(9.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymcsrvstatus-1.0.1.tar.gz.
File metadata
- Download URL: pymcsrvstatus-1.0.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05406c7a5522e6778c66f446e7a42f3a85940c8c12343df509209c4941435d6b
|
|
| MD5 |
df13e8349795db8e61f3ff036b818f65
|
|
| BLAKE2b-256 |
a042956620b6398930d94467440723e2df3557344e9a52c586fb6bd102477f45
|
File details
Details for the file pymcsrvstatus-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pymcsrvstatus-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d799e6c3dc885d610c359580d398814dffef5e35c190f32bf588c54cf8cd1e4c
|
|
| MD5 |
0ba19c51b58716ec16b31bcf765ea48b
|
|
| BLAKE2b-256 |
8916ae7c7118117eb574fbe6b398151d98df5f66135883dfc0553275ee31205d
|