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.
Panel is the top-level entry point for all communication with a Pterodactyl panel. It wraps the Pterodactyl Client API, handles authentication headers, and exposes thin HTTP primitives (get, post, delete, patch) that every other HungerLib class builds on. Instantiate one Panel per panel instance and pass it into your server objects.
Constructor
A human-readable label for this panel instance. Used in logging and
__str__ output — not sent to the API.Base URL of the Pterodactyl panel, e.g.
https://panel.example.com. Trailing slashes are stripped automatically.Pterodactyl Client API key (starts with
ptlc_). Passed as a Bearer token on every request.Properties
headers
dict:
Health Checks
ping()
GET /api/client request to verify that the panel is reachable and responsive. Catches all network-level exceptions internally and returns False instead of raising.
Returns bool — True if the panel responds with HTTP 200, False for any error or non-200 status.
validateAPI()
GET /api/client/account to verify that the configured API key is valid and has the necessary account-level permissions.
Returns bool — True if the response is HTTP 200 (key is valid), False otherwise.
HTTP Primitives
These methods are thin wrappers aroundrequests and are used internally by every API sub-module. You can call them directly for custom endpoint access.
get()
API path to append to the base URL, e.g.
"/api/client/servers".Request timeout in seconds.
requests.Response.
post()
API path to POST to.
JSON-serialisable dict to send as the request body.
Request timeout in seconds.
requests.Response.
delete()
API path to send the DELETE request to.
Request timeout in seconds.
requests.Response.
patch()
API path to PATCH.
JSON-serialisable dict to send as the request body.
Request timeout in seconds.
requests.Response.
_raw_upload()
POST request for file uploads. Unlike the other HTTP methods, this call only attaches the Authorization header (no Content-Type), allowing requests to set the multipart boundary automatically.
API path for the upload endpoint.
A
files dict as expected by requests.post(files=...), e.g. {"files": ("filename.txt", open(..., "rb"))}.requests.Response.
API Sub-Modules
After construction,Panel exposes the following sub-module attributes. Each sub-module is a thin API wrapper that GenericServer delegates to — you generally call the server-level convenience methods rather than these directly.
| Attribute | Class | Description |
|---|---|---|
panel.schedules | ScheduleAPI | Create, update, delete, and run scheduled tasks. See ScheduleAPI. |
panel.files | FileManagerAPI | List, upload, download, copy, move, compress, and delete server files. See FileManagerAPI. |
panel.backups | BackupsAPI | List, create, download, and delete server backups. See BackupsAPI. |
panel.databases | DatabasesAPI | List, create, rotate passwords for, and delete server databases. See DatabasesAPI. |
panel.startup | StartupAPI | Read and update server startup variables. See StartupAPI. |
panel.commands | CommandAPI | Send raw console commands to a server. See CommandAPI. |