Metadata-Version: 2.4
Name: ventro-minecraft-status
Version: 1.0.0
Summary: Minecraft Java server status (online, players, version, MOTD, latency) from the free VentroHosting API. No dependencies.
Author-email: VentroHosting <info@ventrohosting.com>
License: MIT
Project-URL: Homepage, https://ventrohosting.com/tools/minecraft-server-status
Project-URL: Source, https://github.com/ventrohosting/ventro-minecraft-status-python
Keywords: minecraft,server-status,minecraft-server,ping,motd,status-badge
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ventro-minecraft-status

Check a Minecraft Java Edition server from Python: online or offline, players, version, MOTD and latency. It uses the free status API of [VentroHosting](https://ventrohosting.com/tools/minecraft-server-status). No dependencies, Python 3.8+.

```python
from ventro_minecraft_status import status, badge_url, StatusError

try:
    s = status("play.example.com")        # SRV records are resolved, "host:port" works too
    print(s["online"], s["players"], s["max"], s["version"], s["latencyMs"])
    print(s["motdText"])
except StatusError as e:
    print(e.reason, e)                    # invalid, dns, port, blocked, rate, network ...

print(badge_url("play.example.com"))      # https://ventrohosting.com/badge/play.example.com.svg
```

The API limits requests per visitor. Cache the result and do not poll more than once a minute.

Only the address you pass is sent to ventrohosting.com ([privacy policy](https://ventrohosting.com/datenschutz)). A browser version with a badge generator is on [ventrohosting.com/tools/minecraft-server-status](https://ventrohosting.com/tools/minecraft-server-status) (German). MIT licence.
