UTL (Universal Template Language) is a powerful and flexible templating engine designed to simplify the process of generating dynamic content. It allows developers to create templates that can be easily populated with data, making it ideal for prompt engineering, document generation, and more. It will be ported to the most popular programming languages. Discord community: https://discord.gg/yhRanS6Z8w
- Simple Syntax: UTL uses a straightforward syntax that is easy to learn and use
- Data Binding: Easily bind data to templates using placeholders
- Pipes: Support for pipes to create complex templates
- Extensible: Easily extendable to support custom functions and filters
To install UTL, simply include the library in your project. You can download it from the official repository or use a package manager if available.
Here's a basic example of how to use UTL:
from utl import render
template = "Hello, { name | upper }!"
data = {"name": "world"}
output = render(template, data)
print(output) # Output: Hello, WORLD!
- Placeholders: Use
{ placeholder }
to denote a variable that will be - Pipes: Use the pipe symbol
|
to apply functions to placeholders, e.g.,{ name | upper }