Skip to main content

Generated Python SDK for the Octospark public API.

Project description

octospark-sdk

PyPI version license

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 OctosparkApiError with 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

octospark_sdk-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

octospark_sdk-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

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

Hashes for octospark_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bb2688b1cba73112f89bc76bc5894a291d54ae8d011ead0b5a32f3b98728819b
MD5 ddcd85d1fc6748d0fff154b51ddeb655
BLAKE2b-256 4b6a72fb01888a52274128a305573a6a1ed5446c0ccf4a533f7b7427dc879a5a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for octospark_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73e2a09a97d7d3b5219ca845640b071a48e03bb34683d2b74ec7e9ec3884536b
MD5 f72f34bb5720b853213a723e47525bf5
BLAKE2b-256 4123321d0f9b32fb3906ec58a828463758aef5c8820ad66ef6c16cf711f027c0

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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