hpcflow.sdk.persistence.zarr.ZarrStoreParameter#

class hpcflow.sdk.persistence.zarr.ZarrStoreParameter(id_, is_pending, is_set, data, file, source)#

Bases: StoreParameter

Represents a parameter in a Zarr persistent store.

Methods

decode

Initialise from persistent store parameter data.

encode

Prepare store parameter data for the persistent store.

set_data

Return a copy, with data set.

set_file

Return a copy, with file set.

update_source

Return a copy, with updated source.

Attributes

id_

The ID of this parameter.

is_pending

Whether the parameter has changes not yet persisted.

is_set

Whether the parameter is set.

data

Description of the value of the parameter.

file

Description of the file this parameter represents.

source

Description of where this parameter originated.

Parameters:
data: ParameterTypes#

Description of the value of the parameter.

classmethod decode(id_, data, source, *, path=None, **kwargs)#

Initialise from persistent store parameter data.

Parameters:
Return type:

Self

encode(**kwargs)#

Prepare store parameter data for the persistent store.

Return type:

dict[str, Any] | int

file: File | None#

Description of the file this parameter represents.

id_: int#

The ID of this parameter.

is_pending: bool#

Whether the parameter has changes not yet persisted.

is_set: bool#

Whether the parameter is set.

set_data(value)#

Return a copy, with data set.

Parameters:

value (Any) –

Return type:

Self

set_file(value)#

Return a copy, with file set.

Parameters:

value (File) –

Return type:

Self

source: ParamSource#

Description of where this parameter originated.

update_source(src)#

Return a copy, with updated source.

Parameters:

src (ParamSource) –

Return type:

Self