Skip to main content

Config files renderer based on Jinja2

Project description

# jingle

Config files renderer based on Jinja2.

It renders template files with context loaded from simple INI-style config files. Config files support [inheritance](#inheritance) and [interpolation](#interpolation).

## Getting started

Install this package with _pip_:

$ pip install jingle

Check usage:

$ jingle –help

Run some examples:

$ jingle examples/hello.conf < examples/hello.j2

## Config files

_Jingle_ supports single-group INI config files. For example:

one: 1 two: dos three: trzy

### Interpolation

Basic interpolation is supported thanks to SafeConfigParser used under the hood:

name: Jon surname: Snow fullname: %(name) %(surname)

### Inheritance

Config files can be inherited, or saying precisely included one into another with #inherit directive.

In defaults.conf:

host: 0.0.0.0 port: 3000

In production.conf:

#inherit defaults.conf port: 80

Compiled config will use host: 0.0.0.0 and port: 80.

Of course interpolation works across inherited files.

## License

Copyright 2014 by Kris Kovalik.

Released under MIT license, check [LICENSE](LICENSE) file for details.

Project details


Supported by

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