graphit/graph_io/io_helpers.py
def flatten_nested_dict(config, parent_key='', sep='.'):
    """
    Flatten a nested dictionary by concatenating all
    nested keys.
    Keys are converted to a string representation if
    needed.
    
    :param config:     dictionary to flatten
    :type config:      :py:dict
    :param parent_key: leading string in concatenated keys
    :type parent_key:  :py:str
    :param sep:        concatenation separator
    :type sep:         :py:str
    :return:           flattened dictionary
    :rtype:            :py:dict
    """
    
    items = []
    for key, value in config.items():

        new_key = to_unicode('{0}{1}{2}'.format(parent_key, sep, key) if parent_key else key)
        if isinstance(value, collections.MutableMapping):
            items.extend(flatten_nested_dict(value, new_key, sep=sep).items())
        else:
            items.append((new_key, value))
    
    return dict(items)

    Flatten a nested dictionary by concatenating all
    nested keys.
    Keys are converted to a string representation if
    needed.
    
    :param config:     dictionary to flatten
    :type config:      :py:dict
    :param parent_key: leading string in concatenated keys
    :type parent_key:  :py:str
    :param sep:        concatenation separator
    :type sep:         :py:str
    :return:           flattened dictionary
    :rtype:            :py:dict
    
Flatten a nested dictionary by concatenating all
nested keys.
Keys are converted to a string representation if
needed.
Flatten a nested dictionary by concatenating all nested keys . Keys are converted to a string representation if needed .
def flatten_nested_dict(config, parent_key='', sep='.'):
    items = []
    for key, value in config.items():
        new_key = to_unicode('{0}{1}{2}'.format(parent_key, sep, key) if parent_key else key)
        if isinstance(value, collections.MutableMapping):
            items.extend(flatten_nested_dict(value, new_key, sep=sep).items())
        else:
            items.append((new_key, value))
    return dict(items)
def flatten_nested_dict ( config , parent_key = '' , sep = '.' ) : items = [ ] for key , value in config . items ( ) : new_key = to_unicode ( '{0}{1}{2}' . format ( parent_key , sep , key ) if parent_key else key ) if isinstance ( value , collections . MutableMapping ) : items . extend ( flatten_nested_dict ( value , new_key , sep = sep ) . items ( ) ) else : items . append ( ( new_key , value ) ) return dict ( items )
Flatten a nested dictionary by concatenating all
nested keys.
Flatten a nested dictionary by concatenating all nested keys .
"""
    Flatten a nested dictionary by concatenating all
    nested keys.
    Keys are converted to a string representation if
    needed.
    
    :param config:     dictionary to flatten
    :type config:      :py:dict
    :param parent_key: leading string in concatenated keys
    :type parent_key:  :py:str
    :param sep:        concatenation separator
    :type sep:         :py:str
    :return:           flattened dictionary
    :rtype:            :py:dict
    """
None
:py:dict
config
dictionary to flatten
dictionary to flatten
parent_key
leading string in concatenated keys
leading string in concatenated keys
sep
None