Skip to main content

SporeStack API library and CLI for launching servers with Monero or Bitcoin

Project description

Python 3 library and CLI for SporeStack (SporeStack Tor Hidden Service)

Changelog

Requirements

  • Python 3.9-3.11 (and likely newer)

Running without installing

  • Make sure pipx is installed.
  • pipx run 'sporestack[cli]'

Installation with pipx

  • Make sure pipx is installed.
  • pipx install 'sporestack[cli]'

Traditional installation

  • Recommended: Create and activate a virtual environment, first.
  • pip install sporestack (Run pip install 'sporestack[cli]' if you wish to use the command line sporestack functionality and not just the Python library.)

Getting started

Recommended: Make sure you're on the latest stable version comparing sporestack version with git tags in this repository, or releases on PyPI.

  • sporestack aup

First, read the Acceptable Use Policy.

  • sporestack token create --dollars 250 --currency xmr

Create a new token. Fund it with $250, and pay with Monero.

This command will suggest that you create an SSH key for the token. That command should look something like this...

  • ssh-keygen -C "" -t ed25519 -f ~/.sporestack/sshkey/primary/id_ed25519'

We recommend creating an SSH key for your token. If you don't want do this, you can pass --ssh-key-file when you launch a server. Otherwise, ~/.ssh/id_rsa.pub will be the default.

This SSH key should be backed up and kept secret, just like your token!

Usage examples

  • sporestack token list

List the tokens that you have saved locally.

  • sporestack token info

View information about the token, including how many days left your token can sustain your autorenewal servers for.

  • sporestack token messages

View messages on the token.

  • sporestack token invoices

View invoices on the token.

  • sporestack server operating-systems

View available operating systems.

  • sporestack server flavors

View available "flavors" (plans, or server sizes.)

  • sporestack server regions

View available regions. Note that all three of these commands accept a --provider option, in case you're only interested in viewing a particular provider's servers.

  • sporestack server launch --hostname SomeHostname --operating-system freebsd-14 --autorenew --provider vultr --flavor vc2-1c-1gb --region ord

Launch a FreeBSD 14 server on Vultr, in Chicago, Illinois, USA. This will use your primary token, unless you pass --token for something else. This server will automatically renew from your token's balance.

If you find the server off, check your token's balance with sporestack token info. If servers aren't able to automatically renew, they are powered off as a way to signal that payment is needed, else the server will be deleted. We don't have any way to email you if this is the case, given the nature of our service!

Make sure you match up your chosen provider with the flavor, operating system, and region options!

  • sporestack server stop --hostname SomeHostname

Shutdown the server by hostname.

  • sporestack server stop --machine-id ss_m_... # Or use --machine-id to be more pedantic.

Shutdown the server by its machine ID, if it doesn't have a hostname, or if you want to be more pedantic.

  • sporestack server start --hostname SomeHostname

Turn the server back on.

  • sporestack server autorenew-enable --hostname SomeHostname

Enable autorenew on the server.

  • sporestack server autorenew-disable --hostname SomeHostname

Disable autorenew on the server.

  • sporestack server list

List your servers.

  • sporestack server info --hostname SomeHostname

Get more detailed information on your server than the list view.

  • sporestack server delete --hostname SomeHostname

Delete the server.

  • sporestack server launch --hostname SomeHostname --operating-system debian-12 --days 1 --provider digitalocean --flavor vps-1vcpu-1gb --region auto

Launch a server on DigitalOcean, in a random region. This is for a one day fixed lifetime, after which it will be deleted if not renewed.

Notes

  • If you want to communicate with the SporeStack API using Tor, set this environment variable: SPORESTACK_USE_TOR_ENDPOINT=1. Verify which endpoint is in use with sporestack api-endpoint.

Developing

  • pipenv install --deploy --dev
  • pipenv run make test
  • pipenv run make format to format files and apply ruff fixes.

Licence

Unlicense/Public domain

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

sporestack-14.5.0.tar.gz (54.7 kB view details)

Uploaded Source

Built Distribution

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

sporestack-14.5.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file sporestack-14.5.0.tar.gz.

File metadata

  • Download URL: sporestack-14.5.0.tar.gz
  • Upload date:
  • Size: 54.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for sporestack-14.5.0.tar.gz
Algorithm Hash digest
SHA256 9ff739c7080c3cb559fb4a0c9eeab6c2a033339281ee2ca4ffb4f1b48f33c788
MD5 b2e0ef1cfdaa2e1aa46005360b98b987
BLAKE2b-256 2956bca3cd14098b484b07b92aee30e14271446373fc0b0c211e3a5ea7cc7d97

See more details on using hashes here.

File details

Details for the file sporestack-14.5.0-py3-none-any.whl.

File metadata

  • Download URL: sporestack-14.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for sporestack-14.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 879d64586006c2a5a8e8c0c70756e2f5b3471ef5ff038a738ff61677c8eabc13
MD5 48712fb88773299d6e4340303cd11ab8
BLAKE2b-256 7c101ba1e8c078eba1bb3789621e25ce51ef8a555cc549305d9c7e4e766d75ba

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