Cell Instance#
Client for managing cell instances.
Cell instance client for managing individual cell records.
This module provides the CellInstanceClient for creating, reading,
updating, and deleting cell instances, which represent individual physical
battery cells linked to a cell specification.
- class ionworks.cell_instance.CellInstanceClient(client)[source]#
Bases:
objectClient for managing cell instances.
- Parameters:
client (Any)
- __init__(client)[source]#
Initialize the CellInstanceClient.
- Parameters:
client (Any) – The HTTP client instance used for API calls.
- Return type:
None
- get(cell_instance_id)[source]#
Get a specific cell instance by ID.
- Parameters:
cell_instance_id (str)
- Return type:
- list(cell_spec_id)[source]#
List all cell instances for a specification.
- Parameters:
cell_spec_id (str) – The ID of the cell specification.
- Returns:
All instances belonging to the specification.
- Return type:
- update(cell_instance_id, data)[source]#
Update an existing cell instance.
- Parameters:
- Returns:
The updated cell instance.
- Return type:
- delete(cell_instance_id)[source]#
Delete a cell instance by ID.
- Parameters:
cell_instance_id (str)
- Return type:
None
- detail(cell_instance_id, include_steps=True, include_cycles=True, include_time_series=True)[source]#
Get full details for a cell instance.
Composes flat API endpoints in parallel to build the complete detail view. For each measurement, fetches steps/cycles and time series according to the
include_*flags.- Parameters:
cell_instance_id (str) – The cell instance ID.
include_steps (bool, optional) – Whether to fetch step data for each measurement. Defaults to True.
include_cycles (bool, optional) – Whether to fetch cycle metrics for each measurement. Defaults to True.
include_time_series (bool, optional) – Whether to fetch time series for each measurement. Defaults to True.
- Returns:
Instance metadata, specification foreign key, and a list of measurement details.
- Return type:
- create(cell_spec_id, data)[source]#
Create a new cell instance under a specification.
- Parameters:
- Returns:
The newly created cell instance.
- Return type: