pymcsrvstatus
A simple async API wrapper for the mcsrvstat.us API.
Usage
import asyncio
from pymcsrvstatus import McSrvStatusClient
async def example(address: str) -> None:
async with McSrvStatusClient(extra_user_agent="pymcsrvstatus example") as client:
if await client.check_if_online(address):
print("Wynncraft is online!")
else:
print("Wynncraft is offline!")
status = await client.fetch(address)
assert status.online is True
print(status.protocol) # Protocol(version=769, name='1.21.4')
print(status.version) # "1.21.4+"
print(status.players) # Players(online=2704, max=3500, players=[])
print(client.get_icon_url(address)) # play.wynncraft.com
asyncio.run(example(address="play.wynncraft.com"))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymcsrvstatus-2.0.0.tar.gz
(3.7 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-2.0.0.tar.gz.
File metadata
- Download URL: pymcsrvstatus-2.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bee5c4bda008e0e6bbe14330b5a0e644b5442548212aec9f1c09ec71d418a840
|
|
| MD5 |
d36288933f123972aa83034244f0e099
|
|
| BLAKE2b-256 |
67d55453b5576029f5300fd0b6581aa122e14847e22fa6b977828fe9854f2eda
|
File details
Details for the file pymcsrvstatus-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pymcsrvstatus-2.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e6f7518607b3ecf2a034ffda7502e519716ba0cc88ecb8d75de5831c4c6632
|
|
| MD5 |
a90e0eaa6a86fc1b697d293212fe9bf2
|
|
| BLAKE2b-256 |
28c6ba81caf78248a1cf28d8cb45b27dc1cd72b77b12d03b347a653864e3a36d
|