Skip to main content

utils.extended_dictionary

ExtendedDictionary Objects

class ExtendedDictionary()

Class to access data from a dictionary through dot notation.

value

def value(path: str, default: typing.Any = None) -> typing.Any

Gets a value from the dictionary, supporting dot notation.

Arguments:

  • path - The full value path.
  • default - A default value.

Returns:

The value or the default one if none was found.

value_from_data

def value_from_data(data: typing.Any,
path: str,
default: typing.Any = None) -> typing.Any

Gets a value from a specific data object.

Arguments:

  • data - The data object.
  • path - The value path.
  • default - A default value.

Returns:

The value or the default one if none was found.

data

@property
def data() -> typing.Any

The raw data.