Jinja2 CLI

1.0.1 · active · verified Sat Apr 11

jinja2-cli is a command-line interface for rendering Jinja2 templates. It allows users to combine data from various sources (JSON, YAML, INI, TOML, environment variables) with Jinja2 templates directly from the shell. The current version is 1.0.1, actively maintained, with a focus on stability and new input formats, while ensuring backwards compatibility since v1.0.0, except for Python 2 support.

Warnings

Install

Imports

Quickstart

Create a simple JSON data file and a Jinja2 template, then render the template using the `jinja2` command. The output will be 'Hello, World!'.

echo '{"name": "World"}' > data.json
echo 'Hello, {{ name }}!' > template.j2
jinja2 template.j2 data.json
rm data.json template.j2

view raw JSON →