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.865.tar.gz (162.1 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.865-py3-none-any.whl (283.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octostar_python_client-0.1.865.tar.gz
  • Upload date:
  • Size: 162.1 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.865.tar.gz
Algorithm Hash digest
SHA256 3635574afd39c26ddd0152979cf3275062c66a8e7d91709f66f201ad9fe877dd
MD5 d80c33863fe28df095bcac946be26669
BLAKE2b-256 b619c9b22a0f83f8eed20638494d11a4767453d54062895c4d710a2496574bfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for octostar_python_client-0.1.865.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.865-py3-none-any.whl.

File metadata

File hashes

Hashes for octostar_python_client-0.1.865-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb01766192ed85c5a715fea841da92ff05df66b7b38c7b067e05c9f2304573c
MD5 88c9e5a11ad993b29d6f2af0e2b31369
BLAKE2b-256 924439a0d45774144349b2d9385eeaf90d05c3475312fbf7cc8a6a8a28985194

See more details on using hashes here.

Provenance

The following attestation bundles were made for octostar_python_client-0.1.865-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.917

2 files

0.1.916

2 files

0.1.915

2 files

0.1.914

2 files

0.1.913

2 files

0.1.912

2 files

0.1.911

2 files

0.1.910

2 files

0.1.909

2 files

0.1.908

2 files

0.1.907

2 files

0.1.906

2 files

0.1.905

2 files

0.1.904

2 files

0.1.903

2 files

0.1.902

2 files

0.1.901

2 files

0.1.900

2 files

0.1.899

2 files

0.1.898

2 files

0.1.897

2 files

0.1.896

2 files

0.1.895

2 files

0.1.894

2 files

0.1.893

2 files

0.1.892

2 files

0.1.891

2 files

0.1.890

2 files

0.1.889

2 files

0.1.888

2 files

0.1.887

2 files

0.1.886

2 files

0.1.885

2 files

0.1.884

2 files

0.1.883

2 files

0.1.882

2 files

0.1.881

2 files

0.1.880

2 files

0.1.879

2 files

0.1.878

2 files

0.1.877

2 files

0.1.876

2 files

0.1.875

2 files

0.1.874

2 files

0.1.873

2 files

0.1.872

2 files

0.1.871

2 files

0.1.870

2 files

0.1.869

2 files

0.1.868

2 files

0.1.867

2 files

0.1.866

2 files

This release

0.1.865 This release

2 files

0.1.864

2 files

0.1.863

2 files

0.1.862

2 files

0.1.861

2 files

0.1.860

2 files

0.1.859

2 files

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

0.1.824

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

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page