Liquidz Python Binding
High-performance Liquid template engine for Python, powered by Zig.
Installation
pip install liquidz
Prerequisites: You need to build the Zig library first:
cd ../.. # Go to project root
zig build -Doptimize=ReleaseFast
Usage
from liquidz import render
# Simple variable substitution
result = render("Hello, {{ name }}!", {"name": "World"})
print(result) # "Hello, World!"
# With loops
result = render("{% for item in items %}{{ item }} {% endfor %}", {"items": ["a", "b", "c"]})
print(result) # "a b c "
# With conditionals
result = render("{% if show %}visible{% endif %}", {"show": True})
print(result) # "visible"
# With filters
result = render("{{ name | upcase }}", {"name": "hello"})
print(result) # "HELLO"
# Using JSON string directly
result = render("{{ x }}", '{"x": 42}')
print(result) # "42"
# Empty data (defaults to {})
result = render("Hello")
print(result) # "Hello"
API
render(template, data=None)
Renders a Liquid template with the given data.
Parameters:
template(str): The Liquid template stringdata(dict | str | None): The data to render with. Can be a dict or a JSON string. Defaults toNone(empty dict).
Returns:
str: The rendered template
Raises:
RenderError: If rendering failsLiquidzError: If the library cannot be loaded
render_string(template, data=None)
Alias for render().
Exceptions
LiquidzError: Base exception for all Liquidz errorsRenderError: Raised when template rendering fails
Running Tests
pip install pytest
pytest
License
MIT
Metadata
Release files for liquidz 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liquidz-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| liquidz-0.6.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| liquidz-0.6.0-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details |
Total release size: 1.1 MB
Release files / liquidz-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | liquidz-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 679.3 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
280bb2787c1578d384a1fdc3a7e408495494768d890796ec817af4a2fcb81aeb
|
|
BLAKE2b-256 checksum How to use checksums |
4685d6cc41066106f93fded41012709f0ff28b68ec458599ce11d106212a85e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency logRelease files / liquidz-0.6.0-py3-none-macosx_11_0_arm64.whl
| Download URL | liquidz-0.6.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 197.0 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
397cf5e320348836a60f14de841411c9eeea4efc6b9d563de2894d6414a68f53
|
|
BLAKE2b-256 checksum How to use checksums |
1acb566304641a3415c05ca5a02d8e267538b8e6eec408795ce3f20ea1048dba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency logRelease files / liquidz-0.6.0-py3-none-macosx_10_9_x86_64.whl
| Download URL | liquidz-0.6.0-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 197.0 kB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
9356b2bbbe5a7b663ce4b31796f2184bcf7033d40b209033dfb8ec620d41cfc6
|
|
BLAKE2b-256 checksum How to use checksums |
3bf2fb3fe39b178171bc37807599d98b55b3bd13b900c139e253ec1cae248fd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency log