Skip to main content

Simple templating engine

Project description

renderix

PyPI - Version

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

  1. Create a renderix.toml in your working directory:
name = "John Doe"
  1. Create a template file, e.g. template.txt:
Hello {{ name }}
  1. 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

renderix-0.2.6.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

renderix-0.2.6-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for renderix-0.2.6.tar.gz
Algorithm Hash digest
SHA256 7dc0f6f0f093dc79709551ec6b849436a211307f265df14963b65cfc798a6e84
MD5 265d5358f453171061e7e2e9fae8ca11
BLAKE2b-256 d46436cf4896c90cf3f53152d4f9fae0f0b39020e785d88f3ed03cb15d633056

See more details on using hashes here.

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

Hashes for renderix-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 67cb408eaa06c53863b8d8c3929bc1f57d285707f7a7b6776c92dedf8b4a484e
MD5 327a7a0a0c7534108ca534d2f31baf52
BLAKE2b-256 e89481c7d6f98e90051084722314430842db361c9e5fb72e01f8e136f717f50c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page