--- id: ruamel-yaml-jinja2 version: "0.2.7" license: MIT license_treatment: permissive maintenance: abandoned --- # ruamel.yaml.jinja2 — jinja2 pre and post-processor to update with YAML License: permissive · Maintenance: abandoned · Downloads: 1.5M/mo ## What it is and what it does ruamel.yaml.jinja2 is a plugin that bridges Jinja2 templating and YAML by allowing you to embed template logic in YAML files without breaking YAML syntax before rendering. It works by rewriting Jinja2 constructs during loading, rendering the template, and then restoring the original structure during dumping. The key constraint is that you must use the same YAML instance for both loading and dumping to maintain the round-trip integrity. The intended use case is updating hardcoded values in YAML configuration files while preserving the template logic itself—useful when the template part might only exist in comments or when you want to modify data without touching the templating layer. It integrates with the round-trip processor to maintain formatting and structure. Use it for: - Update hardcoded configuration values in YAML files while preserving embedded Jinja2 template logic. - Generate dynamic YAML configurations from templates without breaking YAML validity before rendering. - Maintain YAML files with template logic in comments or conditional blocks that should not be modified during updates. - Process YAML templates where the template syntax needs to coexist with valid YAML structure. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Enables Jinja2 templating within YAML files by preprocessing templates before YAML parsing and postprocessing after rendering, allowing you to use template logic while keeping the file valid YAML. No. The package is abandoned (last release 2021-09-23) with no known security vulnerabilities but also no maintenance path forward. If you need Jinja2 templating for YAML, consider rendering templates separately before YAML parsing, or evaluate actively maintained alternatives. Install only if you have an existing codebase already depending on it and cannot migrate. ## Install pip install ruamel-yaml-jinja2 uv add ruamel-yaml-jinja2 poetry add ruamel-yaml-jinja2 ## Installing ruamel.yaml.jinja2 Before you install: Installation is straightforward with no runtime dependencies. However, the package has been abandoned since 2021-09-23 with no updates since, so expect no bug fixes or maintenance going forward. License in practice: MIT license is permissive and imposes minimal restrictions—you can use, modify, and distribute the package freely in commercial and private projects with only attribution required. Quickstart: pip install ruamel.yaml.jinja2 from ruamel.yaml import YAML yaml = YAML() data = yaml.load(open('template.yaml')) yaml.dump(data, open('output.yaml', 'w')) Requires Python >=3.6. The package integrates with ruamel.yaml's round-trip processor. Verify before relying: - Whether ruamel.yaml is automatically installed as a dependency or must be manually installed. - Current compatibility with recent Python versions given the last release was 2021-09-23. - Whether the package works correctly with modern Jinja2 versions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags jinja2 templates in yaml, yaml with template variables, preprocess yaml jinja2, yaml template rendering, dynamic yaml configuration, jinja2 yaml preprocessing, yaml-templating, abandoned [View on SkillFed](https://skillfed.io/packages/ruamel-yaml-jinja2) · [View on PyPI](https://pypi.org/project/ruamel-yaml-jinja2/)