Go to file
Administrator 5637790af5 v10.6.0: Add `sporestack server update-server` command.
Also improve test coverage slightly.
2023-05-25 16:24:08 +00:00
src/sporestack v10.6.0: Add `sporestack server update-server` command. 2023-05-25 16:24:08 +00:00
tests v10.6.0: Add `sporestack server update-server` command. 2023-05-25 16:24:08 +00:00
.editorconfig 5.2.1 2022-02-24 23:29:31 +00:00
.gitignore v10.0.0: Cleanups/refactor 2023-04-13 00:01:33 +00:00
.woodpecker.yml Attempt CI fix 2022-11-28 16:49:50 +00:00
CHANGELOG.md v10.6.0: Add `sporestack server update-server` command. 2023-05-25 16:24:08 +00:00
LICENSE.txt 5.2.1 2022-02-24 23:29:31 +00:00
Makefile 9.1.0: Messaging and fixes for API changes 2023-03-29 01:51:06 +00:00
Pipfile Add respx for better testing, fix HTTP 4XX handling 2023-04-14 22:45:43 +00:00
Pipfile.lock v10.6.0: Add `sporestack server update-server` command. 2023-05-25 16:24:08 +00:00
README.md v10.5.0: Added `sporestack token invoices` command 2023-05-12 20:05:38 +00:00
integration-test.sh v10.6.0: Add `sporestack server update-server` command. 2023-05-25 16:24:08 +00:00
pyproject.toml v10.5.0: Added `sporestack token invoices` command 2023-05-12 20:05:38 +00:00
tox.ini v10.1.2: Fix exception handling for HTTP 4XX responses 2023-04-14 23:02:04 +00:00

README.md

Python 3 library and CLI for SporeStack .onion

Changelog

Requirements

  • Python 3.7-3.11 (or maybe newer)

Installation

  • pip install sporestack (Run pip install 'sporestack[cli]' if you wish to use the CLI features and not just the Python library.)
  • Recommended: Create a virtual environment, first, and use it inside there.
  • Something else to consider: Installing rich (pip install rich) in the same virtual environment will make --help-style output prettier.

Running without installing

  • Make sure pipx is installed.
  • pipx run 'sporestack[cli]'
  • Make sure you're on the latest stable version comparing sporestack version with git tags in this repository, or releases on PyPI.

Usage

  • sporestack token create --dollars 20 --currency xmr # Can use btc as well.
  • sporestack token list
  • sporestack token info
  • sporestack server launch --hostname SomeHostname --operating-system debian-11 --days 1 # Will use ~/.ssh/id_rsa.pub as your SSH key, by default (You may also want to consider passing --region to have a non-random region. This will use the "primary" token by default, which is the default when you run sporestack token create.)
  • sporestack server stop --hostname SomeHostname
  • sporestack server stop --machine-id ss_m_... # Or use --machine-id to be more pedantic.
  • sporestack server start --hostname SomeHostname
  • sporestack server autorenew-enable --hostname SomeHostname
  • sporestack server autorenew-disable --hostname SomeHostname
  • sporestack server list
  • sporestack server delete --hostname SomeHostname
  • sporestack server remove --hostname SomeHostname # If expired

Notes

  • If you want to communicate with SporeStack APIs using Tor, set this environment variable: SPORESTACK_USE_TOR_ENDPOINT=1

Developing

  • pipenv install --deploy --dev
  • pipenv run make test (If you don't have make, use almake)
  • pipenv run make format to format files and apply ruff fixes.

Licence

Unlicense/Public domain