in pygenie/conf.py [0:0]
def to_dict(self):
"""
Get a mapping of attributes and loaded configs to values for the object.
Example:
>>> genie_conf = GenieConf()
>>> genie_conf.to_dict()
{...}
Returns:
dict: A mapping of attributes and configs to values.
"""
_dict = {attr: value for attr, value in self.__dict__.items() \
if not attr.startswith('_')}
for attr_name, attr_value in _dict.items():
if isinstance(attr_value, GenieConfSection):
_dict[attr_name] = attr_value.to_dict()
return _dict