pymcsrvstatus (2.0.1)

Published 2026-09-09 14:18:41 -04:00 by cswimr in cswimr/pymcsrvstatus

Installation

pip install --index-url  pymcsrvstatus

About this package

An async API wrapper for the mcsrvstat.us API.

pymcsrvstatus

Discord Actions Status PyPI - Version PyPI - Python Version PyPI - License

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"))

Requirements

Requires Python: >=3.10
Details
PyPI
2026-09-09 14:18:41 -04:00
6
8.1 KiB
Assets (2)
Versions (9) View all
2.0.1 2026-09-09
2.0.0 2026-09-09
1.1.3 2025-06-29
1.1.2 2025-06-29
1.1.1 2025-06-29