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.0.tar.gz (9.2 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.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymcsrvstatus-1.0.0.tar.gz
Algorithm Hash digest
SHA256 692b320f4c45903af5c93adbd2462908019a18f81c6050e3a39db557ad532ed9
MD5 63a9a6977f6887e5e138ed59a954d010
BLAKE2b-256 7975dd163bec43bb6b886b73dc4bdfe9f5d882ba40728813c033f0a6398436bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymcsrvstatus-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fe1b71b51cfef8f0218a8cf5373ec73db165286a12bab9afa60fed6020c6c75
MD5 23c959efadf73f660c42f482444dc852
BLAKE2b-256 1b9a93d85a37ec85366f05c44c3b98ce2b2057c343f2b4e786bc88adf021a28d

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