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
# 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, SimulationNodeQuick example
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
Installation and Setup
Install the package, satisfy requirements, and run a minimal end-to-end snippet.
Initializing the Client
Construct SDKClient and OptixClient, configure timeouts and retries, manage lifecycle.
Management API
Read and query project config, org, teams, memberships, workflow nodes, and audit events.
Pipeline API
Ingest workflow nodes into the graph and wire origin and forward edges.
Generated Bindings
Use the typed OptixClient and per-project node classes produced by optixlog generate.
Recipes
Copy-paste patterns for common tasks: snapshots, pagination, audit exports, and more.