confuzzle

A tiny tool for generating templated config files
Download

confuzzle Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Price:
  • FREE
  • Publisher Name:
  • Jamie Matthews
  • Publisher web site:
  • https://github.com/j4mie/

confuzzle Tags


confuzzle Description

confuzzle is a tiny tool for generating configuration files by combining Jinja2 templates with YAML data.When deploying an application, you often need to create configuration files for various components (databases, web servers, reverse proxies, etc). Often, the same value needs to appear in multiple places (for example, a port number that servers should bind to and clients should connect to). confuzzle lets you store all of your app config in one place (possibly outside of version control), and combine it with your templated config files at build time.ExampleIn your gunicorn.py.tmpl:bind = "127.0.0.1:{{ gunicorn.port }}"In your nginx.conf.tmpl:upstream app_server { server 127.0.0.1:{{ gunicorn.port }} fail_timeout=0;}Here's your config.yamlgunicorn: port: 8080By default, confuzzle reads from stdin and writes to stdout. To use:confuzzle config.yaml < gunicorn.py.tmpl > gunicorn.pyconfuzzle config.yaml < nginx.conf.tmpl > nginx.confNow, your files look like this:bind: "bind = "127.0.0.1:8080"upstream app_server { server 127.0.0.1:8080 fail_timeout=0;}You can also supply a list of YAML files. This might be useful if you'd like to combine a general config file (in version control) with a file containing secrets such as database passwords (not in version control).confuzzle config.yaml secrets.yaml < settings.py.tmpl > settings.pySee confuzzle --help for the full list of arguments.InstallationYou can install confuzzle from PyPI:pip install confuzzleProduct's homepage


confuzzle Related Software