Skip to content

dict_helpers.flatten_dict

Full path: schola.core.utils.dict_helpers.flatten_dict

Flatten nested keys into a single string key per leaf.

flatten_dict(input_dict, prefix ='')

Parameters

  • input_dict (dict) - Possibly nested mapping.

  • prefix (str) - Prepended to each flattened key (underscore-separated path segments).