Short Tech Stories

Repl for jinja2

As i work with Ansible (or I try to learn Ansible) sometimes i want to test little j2 snippets (Used in templates/when conditions / others within Ansible). You can ipython (or your fav repl ) and do it manually or you can use (and contribute) to this little tool i built yesterday.

I’ve called jinrepl (lack of a better name) , and it basically evals strings into j2.template and renders it , nothing major, but with a few neat features.


To install:

pip install termcolor
pip install jinja2
git clone
cd jinrepl

That’s pretty much everything you need so far (with the current set of features)


  • In line jinja rendering
  • Filter autocompletion
  • Conditional and statements autocomplete

But my favourite is , embedded Vim! (haha just os.system(“vim”))

It does a fair bit more , but you can find all about it on the github repo.

More by Short Tech Stories

Topics of interest

More Related Stories