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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Egg

File details

Details for the file pydotconfig-0.1.6.tar.gz.

File metadata

  • Download URL: pydotconfig-0.1.6.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14

File hashes

Hashes for pydotconfig-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c0463a201f6a60be2b8f450b370b60fdc299047f40391674444d654bae2f69fb
MD5 ed492e66d9e49e68743aff583cac7ed8
BLAKE2b-256 f156840aa08de599a384626b8dc5acc83ae65d1827e224ca0df67143dda57763

See more details on using hashes here.

File details

Details for the file pydotconfig-0.1.6-py2.7.egg.

File metadata

  • Download URL: pydotconfig-0.1.6-py2.7.egg
  • Upload date:
  • Size: 4.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14

File hashes

Hashes for pydotconfig-0.1.6-py2.7.egg
Algorithm Hash digest
SHA256 a110496d63170d7acf175a563f7180ab7940ee0ab0819c026f27dab065d39a3e
MD5 f357161c66e5772b6d37e746d4a80572
BLAKE2b-256 3aee3c7b0b552379bab7537cfdfe786d01d233c2e85f9fc6aa65afb40def85ad

See more details on using hashes here.

Supported by

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