Data Container

class hal_py.data_container
data

Gets all stored data.

Returns:A dict from ((1) category, (2) key) to ((1) type, (2) value)
Return type:dict[tuple(str,str), tuple(str,str)]
data_keys

Returns all data key

Returns:A list of tuples ((1) category, (2) key)
Return type:list[tuple(str,str)]
delete_data(self: hal_py.data_container, category: str, key: str, log_with_info_level: bool=False) → bool

Deletes custom data.

Parameters:
  • category (str) – Category of key
  • key (str) – Data key
  • log_with_info_level (bool) – Force explicit logging channel ‘netlist’ with log level info to trace GUI events (default = false)
Returns:

True on success.

Return type:

bool

get_data_by_key(self: hal_py.data_container, category: str, key: str) → Tuple[str, str]

Gets data specified by key and category

Parameters:
  • category (str) – Category of key
  • key (str) – Data key
Returns:

The tuple ((1) type, (2) value)

Return type:

tuple(str, str)

set_data(self: hal_py.data_container, category: str, key: str, value_data_type: str, value: str, log_with_info_level: bool=False) → bool

Sets a custom data entry If it does not exist yet, it is added.

Parameters:
  • category (str) – Key category
  • key (str) – Data key
  • data_type (str) – Data type of value
  • value (str) – Data value
  • log_with_info_level (bool) – Force explicit logging channel ‘netlist’ with log level info to trace GUI events (default = false)
Returns:

True on success.

Return type:

bool