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.1.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.1.tar.gz.
File metadata
- Download URL: pymcsrvstatus-2.0.1.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 |
47a0e148c90d5b7b3927a287a4ab471131dc9419c56ae687231b440a4bbf6e15
|
|
| MD5 |
6abb23893486a1ae44befe35ae78fda3
|
|
| BLAKE2b-256 |
640b4070b499c4e6c000a45698b8488ed6d9f3e551ae8ad02ae16706e13bc6e7
|
File details
Details for the file pymcsrvstatus-2.0.1-py3-none-any.whl.
File metadata
- Download URL: pymcsrvstatus-2.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 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 |
f26a1adb9171def49e4d51e584243b0dc376f93a82be0d5ae1d9ef645d729ec3
|
|
| MD5 |
68aa1386cba2d769a43dd0cfbf60bcd7
|
|
| BLAKE2b-256 |
72e405d8d83ea0fdbf66a736fae1fd265ce717d3a5160b7d189764ec5e5f5627
|