pygeodes.utils.formatting.get_from_dico_path#

pygeodes.utils.formatting.get_from_dico_path(path: str, dico: dict)[source]#

This functions gets a value from a dictionnary using a system of dotted path

Parameters:
pathstr

the dictionnary path

dicodict

the dictionnary

Returns:
Any

the value at path, or None if not found

Examples

dico = {"properties" : {"property_one" : 4}}
value = get_from_dico_path("properties.property_one",dico) # returns 4