<filename>catalog/client/services/__init__.py
#-*- coding: utf-8 -*-

""" EOSS catalog system
 web service package
"""

__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["<NAME>", "<NAME>"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Production"


def getKeysFromDict(dataDict, mapList):
    """
    Return value from a multiple key given by tuple representation e.g. (mainkey, subkey1, subkey2)
    :param dataDict: whole dictionary
    :param mapList: key name tuple
    :return: value of multiple key
    """
    return reduce(lambda my_dict, key: my_dict[key], mapList, dataDict)

<filename>catalog/client/services/__init__.py
#-*- coding: utf-8 -*-

""" EOSS catalog system
 web service package
"""

__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["<NAME>", "<NAME>"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Production"


def getKeysFromDict(dataDict, mapList):
    """
    Return value from a multiple key given by tuple representation e.g. (mainkey, subkey1, subkey2)
    :param dataDict: whole dictionary
    :param mapList: key name tuple
    :return: value of multiple key
    """
    return reduce(lambda my_dict, key: my_dict[key], mapList, dataDict)

#-*- coding: utf-8 -*- EOSS catalog system  web service package Return value from a multiple key given by tuple representation e.g. (mainkey, subkey1, subkey2)     :param dataDict: whole dictionary     :param mapList: key name tuple     :return: value of multiple key