Configs#

class ice.configs.Config(cfg_path=None)[source]#

Bases: dict

path_get(path: List[str])[source]#

Get value from config’s field defined with path.

Parameters:

path (List[str]) – A path to the field in the config defined with sequence of nested fields.

Returns:

A value from specified field.

Return type:

object

path_set(path: List[str], value)[source]#

Set value for config’s field defined with path. Create fields, if path doesn’t exists.

Parameters:
  • path (List[str]) – A path to the field in the config defined with sequence of nested fields.

  • value (obejct) – A value to be set for a specified field.

to_yaml(path: str)[source]#

Dump config to a YAML file at the specified path.

Parameters:

path (str) – A path for YAML file.