The intent of this library is to make it easy to extract subdicts from python dicts by just specifying which keys are needed, in a dotted-syntax.
>>> from subdict import extract_subdict >>> d = {'a': 1, 'b': 0, 'c': {'ca': '3', 'cb': {'cba': 0, 'cbb': False}}} >>> extract_subdict(d, ['a', 'c.cb.cbb']) {'a': 1, 'c': {'cb': {'cbb': False}}}