Skip to main content

Python client for the SparkedHost (Apollo Panel) API — power servers, manage files, run backups.

Project description

sparkedhost

A tiny Python client for the SparkedHost (Apollo Panel) API.

List your servers, hit power buttons, read & write files, manage backups — all behind a small Client / Server API.

Install

pip install sparkedhost

Or pull the latest from main directly:

pip install git+https://github.com/Jkratz01/sparkedhost.git

Setup

Grab an API key from Apollo → API Credentials, then:

export SPARKEDHOST_API_KEY=your_key_here

(or pass Client(api_key="...") directly.)

Usage

from sparkedhost import Client

client = Client()  # reads SPARKEDHOST_API_KEY

# List your servers
for s in client.list_servers():
    print(s.identifier, s.name)

# Pick one
server = client.server("fd90ffb0-108d-4e24-996a-dc9678174d76")

# Power
server.restart()
server.stop()
server.start()

# Files
server.read_file("server.properties")
server.write_file("server.properties", "motd=hello world\n")
server.replace_in_file("server.properties",
                       old="motd=A Minecraft Server",
                       new="motd=Hello!")
server.delete_files(["bad.log"], root="/logs")

# Backups
server.create_backup(name="pre-update")

See example.py for every operation, and CLAUDE.md for the full API reference.

CLI

Installing also drops a sparkedhost command on your PATH:

sparkedhost servers                              # list servers
sparkedhost power <uuid> restart                 # power action
sparkedhost cmd <uuid> "say hello"               # console command
sparkedhost ls <uuid> /logs                      # list a directory
sparkedhost cat <uuid> server.properties         # read a file
echo "motd=hi" | sparkedhost write <uuid> server.properties
sparkedhost rm <uuid> bad.log --root /logs
sparkedhost backup <uuid> "pre-update"

sparkedhost --help lists every subcommand. Commands that fetch data accept --json for raw output (pipeable to jq).

Using with Claude Code

This repo ships a CLAUDE.md so Claude sessions in this repo are auto-fluent. To get the same in a consuming project, add to that project's CLAUDE.md:

We use sparkedhost — see https://raw.githubusercontent.com/Jkratz01/sparkedhost/main/CLAUDE.md

Or in a one-off Claude Code session, type @https://raw.githubusercontent.com/Jkratz01/sparkedhost/main/CLAUDE.md to load it on demand.

License

MIT

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

sparkedhost-0.1.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

sparkedhost-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file sparkedhost-0.1.1.tar.gz.

File metadata

  • Download URL: sparkedhost-0.1.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sparkedhost-0.1.1.tar.gz
Algorithm Hash digest
SHA256 743662c97185aa2455134e2a9ea7d6a17723e361da45ad43b8d22087933d5695
MD5 1884d6ff475fdc1ac00bd9523e7584ac
BLAKE2b-256 dd46afb1112b732239f59fd4ea645228e8385ce0a57d9482296c9f03ae599335

See more details on using hashes here.

File details

Details for the file sparkedhost-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sparkedhost-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sparkedhost-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac728e496bdfc91243eb2bdf0b97dbbf52c8083f2d702d032ccc88748632ea7
MD5 8222e5b1d4de4c1502eb2d9ce1cde208
BLAKE2b-256 3fadceaf7108c617ee69b8a30885fc3adc87f4329a5cfc4a8a30249c7d0702d3

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