Skip to main content

A Python wrapper for the mcstatus.io API.

Project description

MCStatusio

A Python wrapper for mcstatus API.

Installation

You can install the package via pip:

pip install ???

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

Uploaded Source

Built Distribution

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

mcstatusio-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mcstatusio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f48578c1612ecac3a44147c26974b1f7cf7eba08bebe1981412cbbcd15e6633
MD5 a823c0a8c643a76590b0a1d2c939e455
BLAKE2b-256 7c7cf44c3d3bb100d260dd3fa5cb8687a100418b74b24be6418df1d1df71f2a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcstatusio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab8e209f2e6e9ac65220462f27fa79d98d95ae70983b22abcb29b5cd7bba3412
MD5 b3a49daf205dd6150d37cb173d1e7f90
BLAKE2b-256 b5af5312d5906e0e6207918d8dc1b32db9c247f8bb0bbabdad6cff2d3015991a

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