Skip to main content

AIO-YTE - An Asynchronous YAML Template Engine with Python Expressions

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

AIO-YTE is an asynchronous template engine for YAML format that extends the YAML structure with Python expressions, enabling dynamic YAML document generation. The key feature of AIO-YTE is its ability to process Python expressions asynchronously, making it ideal for use in environments that require asynchronous operations, such as web servers or other I/O-bound applications.

Key Features

  • Asynchronous Evaluation: AIO-YTE allows you to use await within your YAML templates, enabling asynchronous processing of expressions. This is particularly useful in modern Python applications where asynchronous code is prevalent.

  • YAML-First Approach: Like its predecessor YTE, AIO-YTE leverages YAML's structure to simplify2the syntax for template expressions, making it more intuitive and human-readable while maintaining YAML's native semantics.

  • Python Expression Integration: AIO-YTE integrates Python syntax directly into YAML, allowing you to use conditionals, loops, and other Python expressions seamlessly within your templates.

Documentation

Comprehensive documentation for YTE can be found at yte-template-engine.github.io.

Comparison with Other Engines

Many template engines are available, such as the popular jinja2. AIO-YTE is specifically designed for YAML, offering several advantages:

  1. YAML-Specific Syntax: By utilizing YAML's syntax, AIO-YTE reduces the need for additional control flow symbols, making the templates more readable and less foreign to those familiar with YAML.
  2. Improved Whitespace Handling: YAML's semantics require careful handling of whitespace, which AIO-YTE manages seamlessly without the need for complex configurations, as might be necessary with engines like jinja2.

Other YAML-specific template engines include:

The main distinction of AIO-YTE is its extension of YAML with native Python syntax and its support for asynchronous operations. This allows for more natural and powerful template processing, particularly in applications that require asynchronous execution.

Differences Between AIO-YTE and YTE

While AIO-YTE retains the core functionality of YTE, it introduces several key enhancements:

  • Asynchronous Processing: The primary difference is the ability to handle asynchronous expressions, enabling the use of await directly within YAML templates.
  • Enhanced Error Handling: AIO-YTE improves error handling, particularly in the context of asynchronous operations, ensuring more robust and predictable template evaluation.
  • Backwards Compatibility: AIO-YTE remains compatible with existing YTE templates but extends their capabilities to handle async code, making it a drop-in replacement for applications that require async processing.

By incorporating these features, AIO-YTE is designed to meet the needs of modern Python applications, offering a powerful and flexible template engine for YAML.

Metadata

Release files for aio-yte 2.0.5

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

Source distribution (sdist)

Source distribution for aio-yte 2.0.5
File Size Uploaded
aio_yte-2.0.5.tar.gz 8.5 kB Details

Built distribution (wheel)

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

Total release size: 16.9 kB

Release files / aio_yte-2.0.5.tar.gz

Download URL aio_yte-2.0.5.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d7f851248712070da92b08df5ba8a808193a48f66f276de9870e42e53c0a268
BLAKE2b-256 checksum
How to use checksums
22a8da3e42e8b433d68b475e664bb001ff326d57ef7a25fd44b626ae75c84088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / aio_yte-2.0.5-py3-none-any.whl

Download URL aio_yte-2.0.5-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
599f1ae7e90d653c6fc4812281ac20df2802de349652a48fe179f2a573566eb4
BLAKE2b-256 checksum
How to use checksums
5a5469d1d51f5546df4591c0da16faff42418d4f8dce955e83625cb24f221c08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

2.0.5 This release

2 release files

2.0.4

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