Skip to main content

jinja2 pre and post-processor to update with YAML

Project description








jinja2 templates for YAML files can normally not be loaded as YAML before rendering the template. This plugin allows pre and post-processing based on the round-trip processor.

It works by rewriting the jinja2 constructs and keeping track of what needs to be “un-rewritten” for this to work, you need to use the same YAML() instance for loading and dumping.

Its intended use is allowing you to update hardcoded values in the YAML file, and not to update the jinja2 template part (which might even only be available in a comment).

See, the bottom of, this StackOverflow answer or this one.


0.2.7 (2021-09-23):
  • add link to example answers on SO, add badges to README

0.2.6 (2021-09-23):
  • fix README

0.2.5 (2021-09-23):
  • fix spurious .pth file for nested package.

  • handling jinja2 comments, PR supplied by Jude N

0.2.2 (2017-10-11):
  • fix for Python 3.x

0.2.1 (2017-06-23):
  • add univeral wheel

0.2.0 (2017-06-23):
  • rename to

0.1.3 (2017-06-18):
  • remove generation of non-functional jinja2 executable

0.1.2 (2017-06-16):
  • added keyword, dependency on ruamel.yaml

0.1.1 (2017-06-14):
  • initial plug-in version

Project details

Download files

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

Source Distribution

ruamel.yaml.jinja2-0.2.7.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

ruamel.yaml.jinja2-0.2.7-py2.py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 2 Python 3

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