--- id: yte version: "1.9.4" license: MIT license_treatment: permissive maintenance: aging --- # yte — A YAML template engine with Python expressions License: permissive · Maintenance: aging · Downloads: 168.8K/mo ## What it is and what it does YTE is a template engine purpose-built for YAML that lets you embed Python expressions directly into YAML files to generate dynamic configurations. Instead of learning a separate templating syntax, you mark Python expressions with a `?` prefix anywhere in your YAML, and YTE evaluates them to produce plain YAML output. The key advantage is that YTE templates remain valid YAML files themselves—the `?` expressions are just strings to the YAML parser—and whitespace handling works naturally without the tuning required by generic engines like Jinja2. The package depends on argparse-dataclass, dpath, and pyyaml to parse command-line arguments, navigate nested data structures, and handle YAML serialization. It's designed for developers who want to avoid learning a new templating language and prefer to write Python expressions in their YAML configurations instead. Use it for: - Generate Kubernetes manifests or Docker Compose files with conditional blocks and loops based on deployment environment. - Build configuration files for infrastructure-as-code tools where Python logic simplifies conditional sections. - Template CI/CD pipeline definitions (GitHub Actions, GitLab CI) with dynamic job matrices and conditional steps. - Create parameterized YAML schemas for application config where expressions compute derived values. - Preprocess YAML data files with Python logic before passing them to downstream tools. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. YTE is a YAML template engine that embeds Python expressions directly into YAML files to dynamically generate YAML documents, using a `?` prefix to mark expressions for evaluation. Yes, if you need to template YAML files and prefer Python expressions over a separate templating language. The low install friction, permissive license, and lack of security vulnerabilities make it a safe choice. The aging maintenance status is a minor concern—the project is stable and unarchived, but verify that the feature set and performance meet your needs before adopting it for critical workflows. ## Install pip install yte uv add yte poetry add yte ## Installing yte Before you install: Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 260 days ago—but the repository remains active and unarchived, suggesting the project is stable rather than abandoned. License in practice: MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution. Quickstart: pip install yte import yte rendered = yte.render_string('key: ? 1 + 1') print(rendered) # key: 2 Requires Python 3.8 or later (supports current versions up to Python 3.x). Verify before relying: - Whether YTE's performance is suitable for large or deeply nested YAML files. - How error messages and debugging experience compare to other YAML template engines. - Whether the package is actively maintained or in maintenance-only mode given the 260-day gap since last release. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 168.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags yaml template engine, dynamic yaml generation, python yaml templating, yaml with expressions, yaml configuration templating, template yaml files, yaml preprocessing, yaml-templating, configuration-generation, python-expressions [View on SkillFed](https://skillfed.io/packages/yte) · [View on PyPI](https://pypi.org/project/yte/)