Cell Specification#

Client for managing cell specifications.

Cell specification client for managing cell type definitions.

This module provides the CellSpecificationClient for creating, reading, updating, and deleting cell specifications, which define the properties of battery cell types (manufacturer, chemistry, ratings, etc.).

class ionworks.cell_specification.CellSpecificationClient(client)[source]#

Bases: object

Client for managing cell specifications.

Provides methods to create, read, update, and delete cell specifications, which define the properties of battery cell types (manufacturer, chemistry, ratings, etc.).

Parameters:

client (Any)

__init__(client)[source]#

Initialize the CellSpecificationClient.

Parameters:

client (Any) – The HTTP client instance for making API requests.

Return type:

None

get(cell_spec_id)[source]#

Get a specific cell specification by ID.

Parameters:

cell_spec_id (str) – The ID of the cell specification to retrieve.

Returns:

The requested cell specification object.

Return type:

CellSpecification

list(include_components=False)[source]#

List all cell specifications.

Parameters:

include_components (bool, optional) – If True, returns each specification with its nested component and material data. Defaults to False (metadata only).

Returns:

A list of all cell specification objects.

Return type:

list[CellSpecification]

create(data)[source]#

Create a new cell specification.

Parameters:

data (dict[str, Any]) – Dictionary containing the cell specification data.

Returns:

The newly created cell specification object.

Return type:

CellSpecification

create_or_get(data)[source]#

Create a new cell specification or get an existing one.

Creates a new cell specification if it doesn’t exist, otherwise returns the existing one.

Parameters:

data (dict[str, Any]) – Dictionary containing the cell specification data.

Returns:

The cell specification object (newly created or existing).

Return type:

CellSpecification

update(cell_spec_id, data)[source]#

Update an existing cell specification.

Parameters:
  • cell_spec_id (str) – The ID of the cell specification to update.

  • data (dict[str, Any]) – Dictionary containing the fields to update. Supports nested component/material data for upsert.

Returns:

The updated cell specification object.

Return type:

CellSpecification

delete(cell_spec_id)[source]#

Delete a cell specification by ID.

Parameters:

cell_spec_id (str) – The ID of the cell specification to delete.

Return type:

None