flasc.utilities.tuner_utilities.nested_get

Contents

flasc.utilities.tuner_utilities.nested_get#

flasc.utilities.tuner_utilities.nested_get(dic: Dict[str, Any], keys: List[str]) Any[source]#

Get a value from a nested dictionary using a list of keys.

Based on: stackoverflow.com/questions/14692690/access-nested-dictionary-items-via-a-list-of-keys

Parameters:
  • dic (Dict[str, Any]) -- The dictionary to get the value from.

  • keys (List[str]) -- A list of keys to traverse the dictionary.

Returns:

The value at the end of the key traversal.

Return type:

Any