def id_to_name(config, short_name):
    """
    Returns the provider :doc:`config` key based on it's ``id`` value.

    :param dict config:
        :doc:`config`.
    :param id:
        Value of the id parameter in the :ref:`config` to search for.

    """

    for k, v in list(config.items()):
        if v.get('id') == short_name:
            return k

    raise Exception(
        'No provider with id={0} found in the config!'.format(short_name))
def id_to_name(config, short_name):
    """
    Returns the provider :doc:`config` key based on it's ``id`` value.

    :param dict config:
        :doc:`config`.
    :param id:
        Value of the id parameter in the :ref:`config` to search for.

    """

    for k, v in list(config.items()):
        if v.get('id') == short_name:
            return k

    raise Exception(
        'No provider with id={0} found in the config!'.format(short_name))
def id_to_name ( config , short_name ) : for k , v in list ( config . items ( ) ) : if v . get ( 'id' ) == short_name : return k raise Exception ( 'No provider with id={0} found in the config!' . format ( short_name ) )
Returns the provider :doc:`config` key based on it's ``id`` value.

    :param dict config:
        :doc:`config`.
    :param id:
        Value of the id parameter in the :ref:`config` to search for.
Returns the provider : doc : config key based on it s id value .