OptixLog Docs
Python SDK

Python SDK

Overview of the OptixLog Python SDK — install, import map, and navigation to the Management, Pipeline, and generated-bindings APIs.

The optixlog Python package lets you ingest typed workflow nodes into a project graph and read or manage every resource in an OptixLog project — config, organization, teams, memberships, members, workflow nodes, node labels, and audit events.

What's in the SDK

The SDK ships three cooperating surfaces.

SDKClient is the HTTP transport layer. You construct it once with your API key and base URL, then hand it to Management or Pipeline. It handles retries, timeouts, and auth headers.

Management exposes read-oriented resources organized as collections with a consistent contract: list, get, get_or_none, iter, count, one, and first. Use it to inspect projects, teams, nodes, and audit events.

Pipeline writes data. Its single entry point — PipelineProject.ingest — creates or updates a workflow node in the graph and wires its edges.

Generated bindings (optixlog_gen.py, produced by optixlog generate) wrap Pipeline with a typed OptixClient and per-project node classes. Passing a node type to a project whose schema doesn't include it is a static type error caught by pyright or mypy.

Import map

import_map.py
# Core transport + shared types
from optixlog import SDKClient, ProjectRef, EntityRef, Page
from optixlog import OptixLogError, AuthenticationError, NotFoundError
from optixlog import MultipleResultsError, ValidationError

# Management API
from optixlog.management import Management

# Pipeline API (low-level)
from optixlog.pipeline import Pipeline, IngestResult

# Generated bindings (produced by `optixlog generate` — not part of the package)
from optixlog_gen import OptixClient, Projects, SimulationNode

Quick example

quick_example.py
from optixlog import SDKClient
from optixlog.management import Management
from optixlog.pipeline import Pipeline

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

# Read project config
mgmt = Management(client)
project = mgmt.project("proj_grating_7f3a")
config = project.config.get()
print(config.name, config.status)

# Ingest a node (using generated bindings)
from optixlog_gen import OptixClient, Projects, SimulationNode

opt = OptixClient()  # picks up base_url/api_key from login or env
result = opt.project(Projects.GRATING_COUPLER_LAB).ingest(
    data=SimulationNode(config={"mesh": "fine"}, solver="fdtd"),
    prompt="FDTD simulation of grating coupler.",
)
print(result.node_id, result.created)

client.close()

Explore the SDK

On this page