Skip to main content

A Python wrapper for the mcstatus.io API.

Project description

MCStatusio

Tests Lint PyPI - Version PyPI - Python Version

A Python wrapper for mcstatus API.

Installation

You can install the package via pip:

pip install mcstatusio

Usage

Bedrock Server Status

from mcstatusio import BedrockServer

server = BedrockServer("play.example.com", 19132)
status = server.status()

if not status.online:
    print("The server is offline.")
else:
    print(f"The server has {status.players.online} players online.")

Java Server Status

from mcstatusio import JavaServer

server = JavaServer("play.example.com", 25565)
status = server.status()

if not status.online:
    print("The server is offline.")
else:
    print(f"The server has {status.players.online} players online.")

Async Usage

Bedrock Server Status

import asyncio
from mcstatusio import BedrockServer

server = BedrockServer("play.example.com", 19132)
status = asyncio.run(server.async_status())

if not status.online:
    print("The server is offline.")
else:
    print(f"The server has {status.players.online} players online.")

Java Server Status

import asyncio
from mcstatusio import JavaServer

server = JavaServer("play.example.com", 25565)
status = asyncio.run(server.async_status())

if not status.online:
    print("The server is offline.")
else:
    print(f"The server has {status.players.online} players online.")

License

This project is licensed under the MIT License. See the LICENSE file for details

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

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

mcstatusio-1.0.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

mcstatusio-1.0.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file mcstatusio-1.0.1.tar.gz.

File metadata

  • Download URL: mcstatusio-1.0.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for mcstatusio-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c8905f92d9c19cb0a2005db840468bc4f9d8140fb9f178d88ceddcea14d7321c
MD5 8e6b3206a9891b661d0b6a8ef39c7dbc
BLAKE2b-256 7b2ae42a6f11819018e939278310c165ad3b87b226748416413a09c23bebb44c

See more details on using hashes here.

File details

Details for the file mcstatusio-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mcstatusio-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for mcstatusio-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a52ccae7809c189e5e25280f7c052431664ed4fa520c4a60882b86cfb9151fe
MD5 f17ece1b7498a2001ee8729bc334174a
BLAKE2b-256 2f86ba814aef8d6859e3727f0122bd1756f824c2f60530d673071173888a0d18

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