jbasko / configmanager

Forget about configparser, YAML, or JSON parsers. Focus on configuration. NOT RECOMMENDED FOR USE (2019-01-26)
MIT License
17 stars 5 forks source link

Value Interpolation #137

Closed jbasko closed 7 years ago

jbasko commented 7 years ago
config = Config('defaults.ini')
config.configparser.load('config.ini', interpolation_enabled=True)
config = Config({
    'uploads': {
        'base_dir': '/opt/uploads-service',
        'tmp_dir': '{base_dir}/tmp',
    }
}, interpolation_enabled=True)

assert config.uploads.tmp_dir.value == '/opt/uploads-service/tmp'
jbasko commented 7 years ago

Value interpolation won't be supported for the time being. It complicates everything.