Data Container
- class hal_py.DataContainer
Container to hold data that is associated with an entity.
- property data
A dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.
- delete_data(self: hal_py.DataContainer, category: str, key: str, log_with_info_level: bool = False) bool
Delete a data entry.
- delete_parameter(self: hal_py.DataContainer, name: str) bool
Delete an explicitly stored parameter value, if any.
- get_data(self: hal_py.DataContainer, category: str, key: str) Tuple[str, str]
Get the data entry specified by the given category and key.
- get_data_map(self: hal_py.DataContainer) Dict[Tuple[str, str], Tuple[str, str]]
Get a dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.
- get_parameter_declaration(self: hal_py.DataContainer, name: str) Optional[hal_py.Parameter]
Get the full declaration of a typed parameter.
- get_parameter_value(*args, **kwargs)
Overloaded function.
get_parameter_value(self: hal_py.DataContainer, name: str) -> Optional[str]
Get the value of a typed parameter. Returns the explicitly-stored value or
Noneif the parameter does not exist.- param str name
The parameter name.
- returns
The value string on success,
Noneotherwise.- rtype
str or None
get_parameter_value(self: hal_py.DataContainer, name: hal_py.Parameter) -> Optional[str]
Get the value of a typed parameter. Returns the explicitly-stored value or
Noneif the parameter does not exist.- param hal_py.Parameter param
The parameter.
- returns
The value string on success,
Noneotherwise.- rtype
str or None
- get_parameters(self: hal_py.DataContainer) Dict[str, Tuple[hal_py.Parameter, str]]
Get all explicitly stored parameter values as a dict from
nameto (declaration, value).
- has_data(self: hal_py.DataContainer, category: str, key: str) bool
Determine whether an entry of given category and key exists.
- has_parameter(*args, **kwargs)
Overloaded function.
has_parameter(self: hal_py.DataContainer, name: str) -> bool
Check whether a parameter with the given name exists and has an explicitly stored value.
- param str name
The parameter name.
- returns
Trueif the parameter is explicitly set,Falseotherwise.- rtype
bool
has_parameter(self: hal_py.DataContainer, param: hal_py.Parameter) -> bool
Check whether a parameter exists and has an explicitly stored value.
- param hal_py.Parameter param
The parameter.
- returns
Trueif the parameter is explicitly set,Falseotherwise.- rtype
bool
- property parameters
All explicitly stored parameter values as a dict from
nameto (declaration, value).
- set_data(self: hal_py.DataContainer, category: str, key: str, data_type: str, value: str, log_with_info_level: bool = False) bool
Add a data entry.<br> May overwrite an existing entry.
- Parameters
- Returns
Trueon success,Falseotherwise.- Return type
- set_parameter(self: hal_py.DataContainer, param: hal_py.Parameter, value: str) bool
Set (or overwrite) the value of a typed parameter as a string. The value is validated, normalized, and stored; any existing entry with the same name is replaced.