A simple async API wrapper for the mcsrvstat.us API. https://pypi.org/project/pymcsrvstatus
  • Python 55.4%
  • Nix 44.6%
Find a file
Renovate 4a4cb6e3e6
All checks were successful
Actions / Build (push) Successful in 36s
Actions / Lint (Python 3.10) (push) Successful in 39s
Actions / Lint (Python 3.11) (push) Successful in 39s
Actions / Lint (Python 3.9) (push) Successful in 39s
Merge pull request 'chore(deps): update catthehacker/ubuntu:act-latest docker digest to ee77eaa' (#80) from renovate/catthehacker-ubuntu-act-latest into main
2026-04-29 11:04:42 -04:00
.forgejo/workflows chore(deps): update catthehacker/ubuntu:act-latest docker digest to ee77eaa 2026-04-29 15:02:09 +00:00
.vscode init @ 1.0.0 2025-06-29 07:25:45 -05:00
LICENSES REUSE Compliance 2025-09-28 09:15:11 -05:00
pymcsrvstatus REUSE Compliance 2025-09-28 09:15:11 -05:00
.envrc REUSE Compliance 2025-09-28 09:15:11 -05:00
.gitignore REUSE Compliance 2025-09-28 09:15:11 -05:00
flake.lock update flake lockfile 2026-03-12 03:37:56 -04:00
flake.nix REUSE Compliance 2025-09-28 09:15:11 -05:00
pyproject.toml REUSE Compliance 2025-09-28 09:15:11 -05:00
README.md REUSE Compliance 2025-09-28 09:15:11 -05:00
renovate.json chore: Configure Renovate (#1) 2025-06-29 08:33:58 -05:00
REUSE.toml REUSE Compliance 2025-09-28 09:15:11 -05:00
uv.lock chore(deps): lock file maintenance 2026-04-27 00:03:03 +00:00

pymcsrvstatus

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

A simple async API wrapper for the mcsrvstat.us API.

Usage

from pymcsrvstatus import check_if_online, fetch, get_icon_url
import asyncio

async def example(address: str) -> None:
    if await check_if_online(address, extra_user_agent="pymcsrvstatus example"):
        print("Hypixel is online!")
    else:
        print("Hypixel is offline!")

    status = await fetch(address, 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, list=None)

    print(get_icon_url(address)) # https://api.mcsrvstat.us/icon/hypixel.net

asyncio.run(example(address="hypixel.net"))