(self, config=None, config_file=None)
| 20 | """ |
| 21 | |
| 22 | def __init__(self, config=None, config_file=None): |
| 23 | if config_file: |
| 24 | with open(config_file, 'r') as fin: |
| 25 | config = json.load(fin) |
| 26 | |
| 27 | self.dict = config |
| 28 | if config: |
| 29 | self._update(config) |
| 30 | |
| 31 | def __getitem__(self, key): |
| 32 | return self.dict[key] |