Generated Python SDK for the Octospark public API.
Project description
octospark-sdk
The official Python SDK for the Octospark public API.
- A method for every operation. Every public API operation is a client method, generated from the same OpenAPI document that powers the API reference.
- Zero dependencies. Built on the Python standard library; nothing else is installed with the package.
- One error type. Every non-2xx response raises
OctosparkApiErrorwith the HTTP status and parsed body. - Python 3.9+.
Install
pip install octospark-sdk
Quick start
Create an API key in Octospark under Organization settings, API Keys, export it, and you are ready:
export OCTOSPARK_TOKEN="octo_live_..."
import os
from octospark_sdk import OctosparkClient
octospark = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
organizations = octospark.organizations_list_organizations(query={"limit": 1})
print(organizations["data"][0])
Full authentication guide: https://docs.octospark.ai/authentication
A complete flow
Discover your organization, pick a team, and list its posts:
import os
from octospark_sdk import OctosparkClient
octospark = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
organizations = octospark.organizations_list_organizations(query={"limit": 1})
organization_id = organizations["data"][0]["id"]
teams = octospark.teams_list_teams(query={"organizationId": organization_id, "limit": 1})
team_id = teams["data"][0]["id"]
posts = octospark.social_list_posts(teamId=team_id, query={"limit": 10})
Error handling
Every non-2xx response raises OctosparkApiError, carrying the HTTP status and the parsed response body:
import os
from octospark_sdk import OctosparkApiError, OctosparkClient
octospark = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
try:
octospark.organizations_list_organizations(query={"limit": 1})
except OctosparkApiError as error:
print(error.status, error.body)
Custom base URL
The client defaults to https://api.octospark.ai. Pass base_url to the constructor to target a different Octospark API environment.
Documentation
| Resource | Link |
|---|---|
| Get started | https://docs.octospark.ai/start |
| Authentication | https://docs.octospark.ai/authentication |
| SDKs | https://docs.octospark.ai/sdks |
| API reference | https://docs.octospark.ai/api-reference/organizations/list-organizations |
| OpenAPI document | https://docs.octospark.ai/openapi.json |
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octospark_sdk-0.1.3.tar.gz.
File metadata
- Download URL: octospark_sdk-0.1.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb2688b1cba73112f89bc76bc5894a291d54ae8d011ead0b5a32f3b98728819b
|
|
| MD5 |
ddcd85d1fc6748d0fff154b51ddeb655
|
|
| BLAKE2b-256 |
4b6a72fb01888a52274128a305573a6a1ed5446c0ccf4a533f7b7427dc879a5a
|
Provenance
The following attestation bundles were made for octospark_sdk-0.1.3.tar.gz:
Publisher:
publish-python-sdk.yml on Just-Understanding-Data-Ltd/octospark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octospark_sdk-0.1.3.tar.gz -
Subject digest:
bb2688b1cba73112f89bc76bc5894a291d54ae8d011ead0b5a32f3b98728819b - Sigstore transparency entry: 1790300026
- Sigstore integration time:
-
Permalink:
Just-Understanding-Data-Ltd/octospark@b87b6624ac497b85b8d37b9c16bf8c4497f874a6 -
Branch / Tag:
refs/tags/python-sdk-v0.1.3 - Owner: https://github.com/Just-Understanding-Data-Ltd
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@b87b6624ac497b85b8d37b9c16bf8c4497f874a6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file octospark_sdk-0.1.3-py3-none-any.whl.
File metadata
- Download URL: octospark_sdk-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e2a09a97d7d3b5219ca845640b071a48e03bb34683d2b74ec7e9ec3884536b
|
|
| MD5 |
f72f34bb5720b853213a723e47525bf5
|
|
| BLAKE2b-256 |
4123321d0f9b32fb3906ec58a828463758aef5c8820ad66ef6c16cf711f027c0
|
Provenance
The following attestation bundles were made for octospark_sdk-0.1.3-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on Just-Understanding-Data-Ltd/octospark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octospark_sdk-0.1.3-py3-none-any.whl -
Subject digest:
73e2a09a97d7d3b5219ca845640b071a48e03bb34683d2b74ec7e9ec3884536b - Sigstore transparency entry: 1790300047
- Sigstore integration time:
-
Permalink:
Just-Understanding-Data-Ltd/octospark@b87b6624ac497b85b8d37b9c16bf8c4497f874a6 -
Branch / Tag:
refs/tags/python-sdk-v0.1.3 - Owner: https://github.com/Just-Understanding-Data-Ltd
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@b87b6624ac497b85b8d37b9c16bf8c4497f874a6 -
Trigger Event:
push
-
Statement type: