Skip to main content

Helper scripts for writing configuration files based on environment variables

Project description



This project is meant to provide utilities for writing out configuration files based on environment variables. Lots of projects seem to be implementing this on their own (Elasticsearch/Grafana), but it would be nice to have one thing that works for them we go!


Set your environment variables with a shared prefix. Section headers should be followed by a double underscore __


$ export MYPREFIX_foo__bar=baz
bar = baz

Check out the help text for current usage info too:

usage: [-h] -p PREFIX [-f {ini,json}]
                                     [-o OUTPUT_FILE] [-r REFERENCE_FILE]

Convert environment variables in to a configuration file

optional arguments:
  -h, --help            show this help message and exit
  -p PREFIX, --prefix PREFIX
                        Prefix of env vars to parse
  -f {ini,json}, --format {ini,json}
                        Output file format
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        Outfile file path
  -r REFERENCE_FILE, --reference-file REFERENCE_FILE
                        Load this reference file for existing/hard coded

Project details

Download files

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

Files for containedenv, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size containedenv-0.0.2.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page