aim2dat.utils.dict_tools
¶
Module implementing several functions to handle nested python dictionaries.
Module Contents¶
Functions¶
|
Create a nested dictionary. |
|
Merge two dictionaries. |
|
Retrieve value from nested dictionary. |
|
Set parameter in a nested dictionary. |
- aim2dat.utils.dict_tools.dict_create_tree(dictionary, parameter_tree)[source]¶
Create a nested dictionary.
- Parameters:¶
dictionary (dict) – Input dictionary.
parameter_tree (list) – List of dictionary key words.
-
aim2dat.utils.dict_tools.dict_merge(a, b, path=
None
)[source]¶ Merge two dictionaries.
- Parameters:¶
a (dict) – Dictionary to be merged into.
b (dict) – Dictionary to be merged.
path (str or None (optional)) – Parameter path of dictionary a.
- aim2dat.utils.dict_tools.dict_retrieve_parameter(dictionary, parameter_tree)[source]¶
Retrieve value from nested dictionary.