Jinja2 templating based on environment variables.
Project description
Simple command line template renderer using Jinja2.
This will parse the current environment into a dictionary tree where each key is split along underscores or camelcase and each element is added a sub-dictionary.
For example:
DATABASE_ONE_URL=mysql:3306
DATABASE_ONE_NAME=one
databaseTwoUrl=mysql2:3306
databaseTwoName=two
AUTH_LDAP=true
Would result in:
{
'database': {
'one': {
'url': 'mysql1:3306,
'name': 'one'
},
'two': {
'url': mysql2:3306,
'name': 'two'
}
},
'auth':
'ldap': 'true'
}
$ j2tmpl template.jinja
$ j2tmpl templatedir/
$ j2tmpl --help
See the GitHub README for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
j2tmpl-0.0.6.tar.gz
(6.9 kB
view hashes)