Metadata-Version: 2.4
Name: rsspot
Version: 0.1.0
Summary: Async-first Python SDK and CLI for Rackspace Spot
Project-URL: Homepage, https://github.com/SparkAIUR/rsspot-sdk
Project-URL: Documentation, https://github.com/SparkAIUR/rsspot-sdk
Project-URL: Repository, https://github.com/SparkAIUR/rsspot-sdk
Project-URL: Issues, https://github.com/SparkAIUR/rsspot-sdk/issues
Author-email: Tri Nguyen <tnguyen@nu-devco.com>, AIUR <aiur@sparkenergy.com>
License-Expression: MIT
License-File: LICENSE
Keywords: api,async,rackspace,sdk,spot
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic-settings>=2.8.0
Requires-Dist: pydantic>=2.11.0
Requires-Dist: pyjwt>=2.10.1
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=13.9.4
Requires-Dist: tomli-w>=1.2.0
Requires-Dist: typer>=0.15.2
Provides-Extra: dev
Requires-Dist: mypy>=1.15.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.25.3; extra == 'dev'
Requires-Dist: pytest>=8.3.5; extra == 'dev'
Requires-Dist: ruff>=0.11.0; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0.12.20250915; extra == 'dev'
Description-Content-Type: text/markdown

# 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

```bash
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

```python
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

```bash
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

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

## Development

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

Additional docs:
- `docs/configuration.md`
- `docs/openapi.md`
