Skip to main content

An async API wrapper for the mcsrvstat.us API.

Project description

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

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.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymcsrvstatus-1.0.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file pymcsrvstatus-1.0.2.tar.gz.

File metadata

  • Download URL: pymcsrvstatus-1.0.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for pymcsrvstatus-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0d947b793837ff7d78c15a044559fac0bf3b4874fd68706ab8bf76014dc5240d
MD5 8c14480522a107420959a94f753660e6
BLAKE2b-256 fbfacb883f545f199215e3b69d88ad0d1cc3872ca0a2b2a2930ffc7db6df7ad1

See more details on using hashes here.

File details

Details for the file pymcsrvstatus-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pymcsrvstatus-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43645d2cacff4b3f8e2bf63fbbada7bbd5a3a583ffa89957fa3c056ed4eb509b
MD5 07e42cece8c8429d953efb0ed1164786
BLAKE2b-256 fa45e6c11ac280e63fc6df46eae215139dfcbc5615bf4fed4dff0e50da9b1dad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page