Skip to main content

Super simple python module for parsing structured config files with overrides

Project description

DotConfig
---------

Super simple python module for parsing structured config files with overrides

Install via:

```
pip install pydotconfig
```

## Example

```
import dotconfig
import os

# Try using these to override the config file values
# For example: export DCFG_BAR='Green Eggs'
ENVVARS = {
'foo': 'DCFG_FOO',
'bar': 'DCFG_BAR'
}

DEFAULTS = {
'foo': 'spam',
'bar': 'eggs'
}

if __name__ == '__main__':
cfg = dotconfig.Config('example', 'settings',
envvars=ENVVARS, defaults=DEFAULTS,
template_file='template.yaml')

print(cfg.to_dict())
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydotconfig-0.1.6.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pydotconfig-0.1.6-py2.7.egg (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page