Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerLib/llms.txt

Use this file to discover all available pages before exploring further.

HungerLib is a Python library that gives you a clean, high-level interface for automating Pterodactyl game server panels. Whether you need to control server power states, manage files, trigger scheduled tasks, or stream Minecraft console commands over HungerBridge, HungerLib provides ready-to-use classes and utilities so you can focus on your automation logic rather than raw HTTP calls.

Quickstart

Install HungerLib and connect to your first Pterodactyl server in minutes.

Configuration

Load YAML-backed config files into typed dataclasses with fallback support.

Server Control

Start, stop, monitor resources, and manage files across generic and Minecraft servers.

HungerBridge

Connect to the HungerBridge v2 API for TPS, player counts, and console commands.

Scheduling

Snap events to clock boundaries, run countdown callbacks, and wait for server states.

API Reference

Full reference for every class, method, parameter, and exception in HungerLib.

What’s included

Panel Client

Authenticated HTTP client wrapping all Pterodactyl Client API endpoints.

GenericServer

Universal server class for power, resources, files, backups, databases, and schedules.

MinecraftServer

Extends GenericServer with Minecraft-specific TPS, players, and broadcast utilities.

BridgeClient

Python client for the HungerBridge v2 REST API running on your Minecraft server.

MessageRouter

Multi-destination logger: terminal, in-game broadcast, and rotating file logs.

Validator

Schema validator for config dataclasses with typed error levels and human-readable reports.

Install

pip install hungerlib
HungerLib requires Python 3.9 or later.
1

Install the library

pip install hungerlib
2

Create a Panel connection

from hungerlib import Panel

panel = Panel(
    name="my-panel",
    url="https://panel.example.com",
    api_key="ptlc_yourAPIkeyHere",
)
print(panel.ping())  # True
3

Attach a server and control it

from hungerlib import GenericServer

server = GenericServer(name="lobby", panel=panel, server_id="abc123")
server.start()
print(server.getStatus())  # "running"
4

Read the guides

Dive into Core Concepts to learn how Panel, GenericServer, and BridgeClient fit together.

Build docs developers (and LLMs) love