Skip to main content

Python Liquid

Python Liquid is a Python engine for Liquid, the safe, customer-facing template language.
We follow Shopify/Liquid closely and test against the Golden Liquid test suite.

PyPi - Version conda-forge Python versions
Tests Coverage
PyPI - Downloads
License


Table of Contents

Install

Install python-liquid from PyPi using your favorite package manager.

pip

pip install python-liquid

uv

uv add python-liquid

pipenv

pipenv install -u python-liquid

conda

conda install -c conda-forge python-liquid

Quick Start

render()

Use the package-level liquid.render() function to render a template with Liquid's default configuration. The first argument is template source code and the second is a dictionary of template variables.

import liquid

print(liquid.render("Hello, {{ you }}!", {"you": "World"}))  # Hello, World!

parse()

Use liquid.parse() to get an instance of liquid.Template, which can be rendered multiple times with different data.

from liquid import parse

template = parse("Hello, {{ you }}!")
print(template.render(you="World"))  # Hello, World!
print(template.render(you="Liquid"))  # Hello, Liquid!

Configure

You'll need to create an instance of liquid.Environment to configure Liquid, then load and render templates from that.

from liquid import Environment, CachingFileSystemLoader

env = Environment(
  autoescape=True,
  loader=CachingFileSystemLoader("./templates")
)

template = env.get_template("index.liquid")
another_template = env.parse("{% render 'greeting' %}, World!")

See docs.

Contributing

Please see Contributing to Python Liquid.

Metadata

Release files for python-liquid 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-liquid 3.0.0
File Size Uploaded Provenance Actions
python_liquid-3.0.0.tar.gz 79.5 kB With provenance Details for python_liquid-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-liquid 3.0.0
File Interpreter ABI Platform Actions
python_liquid-3.0.0-py3-none-any.whl Python 3 none any Details for python_liquid-3.0.0-py3-none-any.whl

Total release size: 211.3 kB

Release files / python_liquid-3.0.0.tar.gz

Download URL python_liquid-3.0.0.tar.gz
Size 79.5 kB
Tags Source
SHA-256 checksum
How to use checksums
88b4b676e41f6ff6e92106c6ddf006370c6f1bfcc2d1f26f7380ea0a7e9da004
BLAKE2b-256 checksum
How to use checksums
9d121f4a0c70565c4e23f73c6f7e5d637f0969fcc8bef69c91616c785cdca453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / python_liquid-3.0.0-py3-none-any.whl

Download URL python_liquid-3.0.0-py3-none-any.whl
Size 131.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0070d22cf531a4179db3151c6cab7e9eabc05cca012b916e9ee4ff43d536487a
BLAKE2b-256 checksum
How to use checksums
5377e580e34ed90da6e15882d20f97d03abfea0410941e06c1789368479c6b69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Security for python-liquid 3.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for python_liquid-3.0.0.tar.gz

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 Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page