예제 #1
0
def filter(config):
    """The subset of configuration keys to be made public."""
    keys = ['myapp.hello', 'myapp.some.deeply.nested.value', 'myapp.oz']
    return filter_dict(config, keys)
예제 #2
0
 def test_filter(self):
     """Ensure that the subset of A is filtered out using keys"""
     a = DotDict(a=1, b=1)
     keys = ['a']
     b = filter_dict(a, keys)
     self.assertEqual(b, {'a': 1})
예제 #3
0
def filter(config):
    """The subset of configuration keys to be made public."""
    keys = ["myapp.hello", "myapp.some.deeply.nested.value", "myapp.oz"]
    return filter_dict(config, keys)