Simple templating engine
Project description
renderix
Simple templating engine.
renderix renders a template file by replacing placeholders like {{ variable_name }} with values loaded from a TOML file named renderix.toml in the current working directory.
Features
- Tiny, no-dependency templating
- Variables loaded from
renderix.toml - Replaces placeholders in the form:
{{ name }} - Output to stdout by default, or write to a file
- Verbose mode for debugging
- For loops
Installation
uv tool install renderix
Or:
git clone https://codeberg.org/nietarne/renderix.git
cd renderix
uv tool install .
Arch Linux:
git clone https://codeberg.org/nietarne/renderix.git
cd renderix
makepkg -si
Quick start
- Create a
renderix.tomlin your working directory:
name = "John Doe"
- Create a template file, e.g.
template.txt:
Hello {{ name }}
- Render it to stdout:
renderix -t template.txt
For loops
Suppose you want to print a list of employees an their age.
renderix.toml:
[[employees]]
name = "Jhon"
age = 40
[[employees]]
name = "Jane"
age = 42
[[employees]]
name = "Joe"
age = 46
In your template:
{{ for employee in employees }}
- {{ employee.name }} is {{ employee.age }} years old
{{ endfor }}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file renderix-0.2.6.tar.gz.
File metadata
- Download URL: renderix-0.2.6.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dc0f6f0f093dc79709551ec6b849436a211307f265df14963b65cfc798a6e84
|
|
| MD5 |
265d5358f453171061e7e2e9fae8ca11
|
|
| BLAKE2b-256 |
d46436cf4896c90cf3f53152d4f9fae0f0b39020e785d88f3ed03cb15d633056
|
File details
Details for the file renderix-0.2.6-py3-none-any.whl.
File metadata
- Download URL: renderix-0.2.6-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cb408eaa06c53863b8d8c3929bc1f57d285707f7a7b6776c92dedf8b4a484e
|
|
| MD5 |
327a7a0a0c7534108ca534d2f31baf52
|
|
| BLAKE2b-256 |
e89481c7d6f98e90051084722314430842db361c9e5fb72e01f8e136f717f50c
|