Skip to main content

An Async YAML template engine with Python expressions

Project description

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.

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

aio_yte-2.0.4.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

aio_yte-2.0.4-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file aio_yte-2.0.4.tar.gz.

File metadata

  • Download URL: aio_yte-2.0.4.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for aio_yte-2.0.4.tar.gz
Algorithm Hash digest
SHA256 88f9e702db9fb572d1790ced00436f16086f93bafd8a80b531392f00883b80dc
MD5 fbd14b7294e266bd1842f0038fd5f546
BLAKE2b-256 280d3f264456a175fcce3ef3c37060487d6a314cc01d092b16aef9a8fe816dc0

See more details on using hashes here.

File details

Details for the file aio_yte-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: aio_yte-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for aio_yte-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 292814cd1cd2cc12c76c65fbb885d90fe661f1c5acb4cf15ee814c1fe926bf28
MD5 fc13707fb5d36fa5c595004150bf145d
BLAKE2b-256 97d31f2de676aaeaac4b568984ff6d0015d0249d85afd8f8f087f2982f47689b

See more details on using hashes here.

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