cfitall.utils.expand_flattened_path

expand_flattened_path(flattened_path, value=None, separator='.')

Expands a dotted path into a nested dict; if value is set, the final key in the path will be set to value.

Parameters
  • flattened_path (str) – the dotted path to expand to a nested dict

  • value (Union[bool, Decimal, float, int, list, str, None]) – final key’s value

  • separator (str) – separator between dict keys in flattened_path

Return type

dict