from gaia_config import DictConfig, IniFileConfig, SystemEnvConfig
# Read from system environments
config = SystemEnvConfig()
# Read from config file
config = IniFileConfig('my.conf')
# Read from dict
d = {'a': '0', 'b': '1'}
config = DictConfig('memory', d)
# Update and reload
d['a'] = '1'
config.reload()
# A typical composite Config
config = DictConfig('hotfix', base_config=IniFileConfig('conf.prop', SystemEnvConfig()))
# Reload the Config when something has changed
config.reload()
# Get a snapshot first so that properties are not updated between read operations.
config = config.copy()
prop = config['prop1']
int_prop = config['intProp'].as_int()
-
Notifications
You must be signed in to change notification settings - Fork 0
License
xuchuan/gaia-config-python
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published