Skip to main content

octostar-python-client

A client library for accessing Octostar API

Usage

First, create a client:

from octostar import Client

client = Client(base_url="https://api.example.com")

If the endpoints you're going to hit require authentication, use AuthenticatedClient instead:

from octostar import AuthenticatedClient

client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")

Now call your endpoint and use your models:

from octostar.models import MyDataModel
from octostar.api.my_tag import get_my_data_model
from octostar.types import Response

my_data: MyDataModel = get_my_data_model.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)

Or do the same thing with an async version:

from octostar.models import MyDataModel
from octostar.api.my_tag import get_my_data_model
from octostar.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)

By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.

client = AuthenticatedClient(
    base_url="https://internal_api.example.com", 
    token="SuperSecretToken",
    verify_ssl="/path/to/certificate_bundle.pem",
)

You can also disable certificate validation altogether, but beware that this is a security risk.

client = AuthenticatedClient(
    base_url="https://internal_api.example.com", 
    token="SuperSecretToken", 
    verify_ssl=False
)

There are more settings on the generated Client class which let you control more runtime behavior, check out the docstring on that class for more info.

Things to know:

  1. Every path/method combo becomes a Python module with four functions:

    1. sync: Blocking request that returns parsed data (if successful) or None
    2. sync_detailed: Blocking request that always returns a Request, optionally with parsed set if the request was successful.
    3. asyncio: Like sync but async instead of blocking
    4. asyncio_detailed: Like sync_detailed but async instead of blocking
  2. All path/query params, and bodies become method arguments.

  3. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)

  4. Any endpoint which did not have a tag will be in octostar.api.default

Installing

pip install octostar-python-client

Testing a PR build (TestPyPI)

Every pull request that touches the SDK publishes a pre-release to TestPyPI versioned 0.0.<pr>.dev<run_number> (e.g. 0.0.898.dev1319) — the <pr> segment is the PR number, so you can find the build for your PR. Use it to test SDK changes before they merge.

TestPyPI does not host third-party dependencies (httpx, tenacity, …), so point the resolver at PyPI as an extra index for them:

# pip
pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  octostar-python-client==0.0.<pr>.dev<N>
# uv (--index-strategy so uv considers both indexes per-package)
uv pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  --index-strategy unsafe-best-match \
  octostar-python-client==0.0.<pr>.dev<N>

Releasing

Releases are automated. On every merge to main, the octostar-api release pipeline builds this package and publishes it to PyPI, stamped with the octostar-api version. There is no manual publish step.

To build the package locally for development:

./scripts/sdk/build.sh          # writes octostar_python_client/dist/*.whl and *.tar.gz
pip install octostar_python_client/dist/*.whl

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octostar_python_client-0.1.824.tar.gz (161.8 kB view details)

Uploaded Source

Built Distribution

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

octostar_python_client-0.1.824-py3-none-any.whl (283.1 kB view details)

Uploaded Python 3

File details

Details for the file octostar_python_client-0.1.824.tar.gz.

File metadata

  • Download URL: octostar_python_client-0.1.824.tar.gz
  • Upload date:
  • Size: 161.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for octostar_python_client-0.1.824.tar.gz
Algorithm Hash digest
SHA256 6920395839fab17e499ece8eb0e7de410173d476dacd1f0aaeaf9d656926ed4f
MD5 ac41bb236d318b3e8b2d0163101cd910
BLAKE2b-256 ae8d463b27b7d61ef73e4d25371e28c91bc097587bacb917442b7ec22eb07a88

See more details on using hashes here.

Provenance

The following attestation bundles were made for octostar_python_client-0.1.824.tar.gz:

Publisher: main_branch.yml on Octostarco/octostar-api

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

File details

Details for the file octostar_python_client-0.1.824-py3-none-any.whl.

File metadata

File hashes

Hashes for octostar_python_client-0.1.824-py3-none-any.whl
Algorithm Hash digest
SHA256 7e9c36d2799517bc51e626d059d9cae7f499ba5c5bf804abf449382ca96ba1c4
MD5 e9c357be1528d55659d684e94d8466cc
BLAKE2b-256 86169bf34e1b24b446f6aefb415e4ce9b7fae74cb37d6fd6da72c10669a90b9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for octostar_python_client-0.1.824-py3-none-any.whl:

Publisher: main_branch.yml on Octostarco/octostar-api

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

Release history Release notifications | RSS feed

1.0.0

1 file

0.1.858

2 files

0.1.857

2 files

0.1.856

2 files

0.1.855

2 files

0.1.854

2 files

0.1.853

2 files

0.1.852

2 files

0.1.851

2 files

0.1.850

2 files

0.1.849

2 files

0.1.848

2 files

0.1.847

2 files

0.1.846

2 files

0.1.845

2 files

0.1.844

2 files

0.1.843

2 files

0.1.842

2 files

0.1.841

2 files

0.1.840

2 files

0.1.839

2 files

0.1.838

2 files

0.1.837

2 files

0.1.836

2 files

0.1.835

2 files

0.1.834

2 files

0.1.833

2 files

0.1.832

2 files

0.1.831

2 files

0.1.830

2 files

0.1.829

2 files

0.1.828

2 files

0.1.827

2 files

0.1.826

2 files

0.1.825

2 files

This release

0.1.824 This release

2 files

0.1.823

2 files

0.1.822

2 files

0.1.821

2 files

0.1.820

2 files

0.1.819

2 files

0.1.818

2 files

0.1.817

2 files

0.1.816

2 files

0.1.815

2 files

0.1.814

2 files

0.1.813

2 files

0.1.812

2 files

0.1.811

2 files

0.1.810

2 files

0.1.809

2 files

0.1.808

2 files

0.1.807

2 files

0.1.806

2 files

0.1.805

2 files

0.1.804

2 files

0.1.803

2 files

0.1.802

2 files

0.1.801

2 files

0.1.800

2 files

0.1.799

2 files

0.1.798

2 files

0.1.797

2 files

0.1.796

2 files

0.1.795

2 files

0.1.794

2 files

0.1.793

2 files

0.1.792

2 files

0.1.791

2 files

0.1.790

2 files

0.1.789

2 files

0.1.788

2 files

0.1.787

2 files

0.1.786

2 files

0.1.785

2 files

0.1.784

2 files

0.1.783

2 files

0.1.782

2 files

0.1.781

2 files

0.1.780

2 files

0.1.779

2 files

0.1.778

2 files

0.1.777

2 files

0.1.776

2 files

0.1.775

2 files

0.1.774

2 files

0.1.773

2 files

0.1.772

2 files

0.1.771

2 files

0.1.770

2 files

0.1.769

2 files

0.1.768

2 files

0.1.767

2 files

0.1.766

2 files

0.1.765

2 files

0.1.764

2 files

0.1.763

2 files

0.1.762

2 files

0.1.761

2 files

0.1.760

2 files

0.1.759

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page