Use this file to discover all available pages before exploring further.
The ionworks-api Python package lets you run simulations and submit parameterization pipelines programmatically. For installation and authentication, see the Python API client page.
Use wait_for_completion to poll until the simulation finishes. The method detects failed and canceled jobs immediately rather than waiting for the timeout.
result = client.simulation.wait_for_completion( response.simulation_id, timeout=120, # seconds (default: 60) poll_interval=2, # seconds between polls (default: 2) verbose=True, # print status updates (default: True))
Set raise_on_failure=False to get the result dict instead of raising an exception when a simulation fails:
result = client.simulation.wait_for_completion( response.simulation_id, raise_on_failure=False,)
# List all simulationssimulations = client.simulation.list()# Get a specific simulationsimulation = client.simulation.get(simulation_id)# Get result data (time series, steps, metrics)result = client.simulation.get_result(simulation_id)
Pipelines combine data fitting, calculations, and validation steps for battery model parameterization. Use client.pipeline to submit and manage pipelines.
Pipelines require a project_id. You can pass it in the config or set the
PROJECT_ID environment variable.
Use these prefixes to reference data sources in pipeline configs:
Prefix
Example
Description
db:
"db:measurement-id"
Reference an uploaded measurement by ID
file:
"file:data.csv"
Load a local CSV file
folder:
"folder:data_dir/"
Load from a local directory
For inline DataFrames in pipeline configs, there is a 1,000-row limit.
Upload larger datasets as measurements first, then reference them with
db:measurement-id.
# List studies in a projectstudies = client.study.list("your-project-id")for study in studies: print(f"{study.name} (ID: {study.id})")# Filter by namestudies = client.study.list("your-project-id", name="Discharge")# Paginate resultsstudies = client.study.list("your-project-id", limit=10, offset=0)
# Assign a simulation to a studyclient.study.assign_simulation("your-project-id", "your-study-id", "simulation-id")# Remove a simulation from a studyclient.study.remove_simulation("your-project-id", "your-study-id", "simulation-id")# Assign a measurement to a studyclient.study.assign_measurement("your-project-id", "your-study-id", "measurement-id")# List measurements in a studymeasurements = client.study.list_measurements("your-project-id", "your-study-id")# Remove a measurement from a studyclient.study.remove_measurement("your-project-id", "your-study-id", "measurement-id")