Skip to main content

YTE - A YAML template engine with Python expressions

Docs test coverage: 100% GitHub Workflow Status PyPI Conda Recipe Conda Downloads Conda Version

YTE is a template engine for YAML format that utilizes the YAML structure in combination with Python expressions for enabling to dynamically build YAML documents.

The key idea of YTE is to rely on the YAML structure to enable conditionals, loops and other arbitrary Python expressions to dynamically render YAML files. Python expressions are thereby declared by prepending them with a ? anywhere in the YAML. Any such value will be automatically evaluated by YTE, yielding plain YAML as a result. Importantly, YTE templates are still valid YAML files (for YAML, the ? expressions are just strings).

Documentation of YTE can be found at https://yte-template-engine.github.io.

Comparison with other engines

Lots of template engines are available, for example the famous generic jinja2. The reasons to generate a YAML specific engine are

  1. The YAML syntax can be exploited to simplify template expression syntax, and make it feel less foreign (i.e. fewer special characters for control flow needed) while increasing human readability.
  2. Whitespace handling (which is important with YAML since it has a semantic there) becomes unnecessary (e.g. with jinja2, some tuning is required to obtain proper YAML rendering).

Of course, YTE is not the first YAML specific template engine. Others include

The main difference between YTE and these two is that YTE extends YAML with plain Python syntax instead of introducing another specialized language. Of course, the choice is also a matter of taste.

Metadata

Release files for yte 1.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yte 1.9.4
File Size Uploaded
yte-1.9.4.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yte 1.9.4
File Interpreter ABI Platform
yte-1.9.4-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / yte-1.9.4.tar.gz

Download URL yte-1.9.4.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
86a47e6d722cec9419a7ac88be57d0d6c4ce28f02860393b71a66f2c674069f6
BLAKE2b-256 checksum
How to use checksums
44f57e44620e6e077bfe624b9a17c329b8e0d0159e176e1f1a93c2790428ab2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yte-1.9.4-py3-none-any.whl

Download URL yte-1.9.4-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dac63303d3e6bc2ebadc36ece3c3fb09343772fe6e25e9356d9baf8f9dfaf6d
BLAKE2b-256 checksum
How to use checksums
4d636a44729fdc60eb255a7b156a84e7552290174a9bf151e3b6c18e83d6fbfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.9.4 This release

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page