OptixLog Docs
API Reference

SDKClient

Core OptixLog client — manages transport, authentication, and project reference handles.

SDKClient is the foundation of the OptixLog Python SDK. It holds the authenticated HTTP transport and is the object you pass to capability views such as Management and Pipeline. It does not expose ingest or management methods directly — those live on the views you construct from it.

from optixlog import SDKClient

SDKClient.__init__(...)

Construct a new client. All parameters are keyword-only.

Signature

def __init__(
    self,
    *,
    base_url: str,
    api_key: str,
    timeout_seconds: float = 30.0,
    max_retries: int = 2,
    user_agent: str | None = None,
    default_headers: Mapping[str, str] | None = None,
) -> None: ...

Parameters

Prop

Type

Returns — None. The client is ready to use after construction.

Side effects — Initialises the underlying httpx.Client with a persistent connection pool. No network call is made during construction.

Raises — Does not raise. Invalid credentials are not discovered until the first request.

Example

client.py
from optixlog import SDKClient

client = SDKClient(
    base_url="https://optixlog.leidos.com",
    api_key="sk-opt-your-key-here",
)

SDKClient.project(project_id)

Return a ProjectRef handle for the given project ID. This is a pure, local operation — no network call is made.

Signature

def project(self, project_id: str) -> ProjectRef: ...

Parameters

Prop

Type

Returns — ProjectRef: a frozen dataclass with a single id field. Pass it to Management.project_from() or Pipeline.project_from() to get a capability view.

Side effects — None (read-only). No network call is made; the ProjectRef is constructed locally.

Raises — Does not raise.

Example

from optixlog import SDKClient
from optixlog.pipeline import Pipeline

client = SDKClient(base_url="https://optixlog.leidos.com", api_key="sk-opt-...")
ref = client.project("proj_grating_7f3a")

pipeline = Pipeline(client)
pp = pipeline.project_from(ref)

SDKClient.close()

Close the underlying HTTP connection pool. Call this when you are done with the client — or use SDKClient as a context manager via a try/finally block.

Signature

def close(self) -> None: ...

Parameters — None.

Returns — None.

Side effects — Closes all open HTTP connections in the connection pool. After calling close(), any subsequent request will raise an error.

Raises — Does not raise under normal conditions.

Example

from optixlog import SDKClient

client = SDKClient(base_url="https://optixlog.leidos.com", api_key="sk-opt-...")
try:
    ref = client.project("proj_grating_7f3a")
    # ... do work ...
finally:
    client.close()

On this page