Skip to main content

Async-first Python SDK and CLI for Rackspace Spot

Project description

rsspot

rsspot is an async-first Python SDK and CLI for Rackspace Spot.

Highlights

  • Async-native client built on httpx.AsyncClient
  • Strong typing via pydantic models
  • Multi-account profile switching (yaml / json / toml)
  • Global singleton client (get_client) plus explicit clients
  • uv-managed project and tooling
  • OpenAPI sync/index scripts for upstream tracking

Quickstart

uv sync
uv run rsspot organizations list --output table

Configuration

Default config path: ~/.spot_config

Supports:

  • flat schema (org, refreshToken, accessToken, region)
  • profile schema (active_profile, profiles.<name>.*)
  • file formats: YAML / JSON / TOML (~/.spot_config extensionless is supported)

Basic SDK usage

import asyncio
from rsspot import get_client


async def main() -> None:
    client = get_client(profile="default")
    orgs = await client.organizations.list()
    print([org.name for org in orgs.organizations])


asyncio.run(main())

CLI examples

uv run rsspot configure --profile prod --org sparkai --region us-central-dfw-1 --refresh-token "$SPOT_REFRESH_TOKEN"
uv run rsspot profiles list
uv run rsspot server-classes list --region us-central-dfw-1 --output table
uv run rsspot inventory vmcloudspaces --org sparkai

OpenAPI tracking

uv run python scripts/sync_openapi.py
uv run python scripts/generate_openapi_index.py

Development

uv run ruff check src tests
uv run mypy src
uv run pytest -q

Additional docs:

  • docs/configuration.md
  • docs/openapi.md

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

rsspot-0.1.0.tar.gz (68.9 kB view details)

Uploaded Source

Built Distribution

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

rsspot-0.1.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file rsspot-0.1.0.tar.gz.

File metadata

  • Download URL: rsspot-0.1.0.tar.gz
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rsspot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e42108f18b10a504d9f9320bfab9493ffb217abe18e68305e5fb44af25b09791
MD5 940534aed81d2f68f8edc31117e76295
BLAKE2b-256 0c0d7ae0bb09bc6d0711cf9302093aee0d9c50656ca7e74524fae24cc0263e0e

See more details on using hashes here.

File details

Details for the file rsspot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rsspot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rsspot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 746a867f5845027863c4e04ecadb949e5293285440a919282f793d02fc984686
MD5 3ccfca2c9f054eb42e90c0f3a728c68e
BLAKE2b-256 18fd532a84ca50c549ad55943edb5636cbf52e39c2648d53100ea81a3c5f846e

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