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.1.0.tar.gz (9.4 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.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymcsrvstatus-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3805cc547c7e543d003ccd3e6386bdd94a2d559a1a2bca4922120da61a294ed3
MD5 c9e0e6fdd239c50814a019f48f7ab0fb
BLAKE2b-256 4c7f8783247c14ea841d11aaed95ff9dcbffffcb48030aae5ee77ba1a738d8b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymcsrvstatus-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8844c3ff1073f2e02eeac93e2138ed2eacecaeff6494cf84054c4f7a4b90a204
MD5 334aaad699e65d7ce4f44e47c03733be
BLAKE2b-256 ffe11235b294a5d4c3df33e9d5c5ce4b5e280871c8cc6e5180078d44f94e91a7

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