Metadata-Version: 2.4
Name: octospark-sdk
Version: 0.1.0
Summary: Generated Python SDK for the Octospark public API.
Project-URL: Homepage, https://docs.octospark.ai
Project-URL: Documentation, https://docs.octospark.ai/sdks
Project-URL: Repository, https://github.com/Just-Understanding-Data-Ltd/octospark
Project-URL: Issues, https://github.com/Just-Understanding-Data-Ltd/octospark/issues
Author: Octospark
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,octospark,sdk
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# octospark-sdk

Generated Python SDK for the Octospark public API.

The SDK uses the same OpenAPI document as the Octospark API reference and defaults to `https://api.octospark.ai`.

## Install

```bash
pip install octospark-sdk
```

## Authentication

Create an API key in Octospark from Organization settings, API Keys.

Store it as `OCTOSPARK_TOKEN` and pass it to the SDK:

```bash
export OCTOSPARK_TOKEN="octo_live_..."
```

Full guide: https://docs.octospark.ai/authentication

## Usage

```python
import os

from octospark_sdk import OctosparkApiError, OctosparkClient

octospark = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])

try:
    organizations = octospark.organizations_list_organizations(query={"limit": 1})
    print(organizations["data"][0])
except OctosparkApiError as error:
    print(error.status, error.body)
```

## Staging

The SDK defaults to production. To target staging, pass `base_url`:

```python
octospark = OctosparkClient(
    base_url="https://api-staging.octospark.ai",
    token=os.environ["OCTOSPARK_TOKEN"],
)
```

## Documentation

- Get started: https://docs.octospark.ai/start
- SDKs: https://docs.octospark.ai/sdks
- Authentication: https://docs.octospark.ai/authentication
- API reference: https://docs.octospark.ai/api-reference/organizations/list-organizations
- OpenAPI document: https://docs.octospark.ai/openapi.json
