コード例 #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
ファイル: test_dicts.py プロジェクト: yola/yoconfigurator
 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
ファイル: public-data.py プロジェクト: yola/yoconfigurator
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)