Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

instantiate a template from various parameter representations.

Project Description
* Synopsis

FCGI_PORT=9000 init.conf.template > yoyodyne.conf

When automating software configuration, one ends up using adhoc templating scheme to
parametrize config files with sed and awk. configen let's you use python's powerful
string formatting to generate config files (or any text for that matter) with
params from various sources.

* Usage
* environment variables
set a bunch of env vars in shell script and invoke from it.
env foo=bar configen template

* name-values fed to stdin
echo foo=bar | configen tempalte -s
env | configen tempalte -s

* json
configen template -j params.json

* yaml
configen template -y params.yaml

* dash '-' can be passed for stdin

* Recpie

* generating from a shell script
USER=tengu init.conf.t

* generating a config file from makefile
export the variables and run configen as follows:

---------- Makefile
export PROJECT_NAME=yoyodyne
export PYTHON=/usr/bin/python
export PROJECT_ROOT=/home/yoyo/dyne
export RUNTIME_ROOT=/home/yoyo/dyne
export FCGI_PORT=9000

yoyodyne.conf: init.conf.t | tee $@
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
configen-0.0.1.tar.gz (2.3 kB) Copy SHA256 Checksum SHA256 Source Apr 26, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting