dragoraapi (Python)
Official Dragora panel API client for Python. Authenticate with a Dragora
API key (dlpu_... for users, dpla_... for admins) or a legacy session token.
Install
pip install dragoraapi # from PyPI
# or locally:
pip install -e .
Usage
from dragoraapi import DragoraAPI
# Use an API key (recommended) — no session_key needed.
api = DragoraAPI(
url="http://localhost:8050",
api_key="dlpu_your-user-api-key",
)
# Or a session token:
api = DragoraAPI(
url="http://localhost:8050",
token="<session-token>",
session_key="<session-key>",
)
API keys
# Create a key (plaintext returned once)
api.create_api_key("my-bot", admin=True, expires_days=30)
# => {"token": "dpla_...", "api_key": {...}, ...}
api.list_api_keys() # your masked keys
api.list_all_api_keys() # admin: every key
api.revoke_api_key(key_id) # revoke
Servers & resources
api.servers()
api.server(10)
api.server_power(10, "start") # start | stop | restart | kill
api.server_console(10, "say hello")
api.server_logs(10)
api.files(10, "/plugins")
api.read_file(10, "server.properties")
api.write_file(10, "server.properties", "...")
api.databases(10)
api.create_database(10, {"database_name": "web", "password": "x", "database_host_id": 1})
api.admin_stats() # admin-only
api.admin_users()
Errors
Non-2xx responses raise DragoraAPIError(status, message, data):
from dragoraapi import DragoraAPIError
try:
api.admin_stats()
except DragoraAPIError as e:
print(e.status, e.message) # 403 ...
Keys
dlpu_= user-scoped API keydpla_= admin-scoped API key (valid only for admin users; grants access to/panel/admin/*and/panel/nodes/*endpoints)
License
MIT
Metadata
Release files for dragoraapi 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dragoraapi-1.0.0.tar.gz | 5.1 kB | Without provenance | Details for dragoraapi-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dragoraapi-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for dragoraapi-1.0.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / dragoraapi-1.0.0.tar.gz
| Download URL | dragoraapi-1.0.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85b3787442e62d4eb06c99460252c2f9be4f9cb388ac855d99cda098d2de8fcf
|
|
BLAKE2b-256 checksum How to use checksums |
ca25664026ba539f07ecb7c450b4cdec447a1ed3d5290b515f27ebb36e6dc5ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / dragoraapi-1.0.0-py3-none-any.whl
| Download URL | dragoraapi-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3bf5bba86d24fb5d67a63d9eb60af737c6883da47dd62cf1a4b33808da2ab38
|
|
BLAKE2b-256 checksum How to use checksums |
bb9c2eb5e758b026d214076d39d89098e89dbf11c3b7c70d377ef327318620c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for dragoraapi 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.