Skip to main content

liquidpy

A port of liquid template engine for python

Pypi Github PythonVers Codacy Codacy coverage Docs building Building

This is compatible with standard Liquid template engine. Variations, such as Shopify and Jekyll are not fully supported yet.

Install

pip install -U liquidpy

Baisic usage

from liquid import Liquid
liq = Liquid('{{a}}')
ret = liq.render(a=1)
# ret == '1'

# with environments pre-loaded
liq = Liquid('{{a}}', a=1)
ret = liq.render()
# ret == '1'

# With debug on:
liq = Liquid('{{a}}', liquid_config={'debug': True})

Python mode

We also support a python mode template engine, which acts more pythonic and powerful.

from liquid import Liquid
# standard liquid doesn't support this
liq = Liquid('{{a + 1}}', {'mode': 'python'})
ret = liq.render(a=1)
# ret == '2'

Both modes can accept a path, a file-like object or a stream for the template:

Liquid('/path/to/template')
# or
with open('/path/to/template') as f:
    Liquid(f)

Full Documentation

Backward compatiblility warning

v0.6.0+ is a remodeled version to make it compatible with standard liquid engine. If you are using a previous version, stick with it. 0.6.0+ is not fully compatible with previous versions.

Metadata

Release files for liquidpy 0.6.2

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

Source distribution (sdist)

Source distribution for liquidpy 0.6.2
File Size Uploaded Provenance Actions
liquidpy-0.6.2.tar.gz 43.8 kB Without provenance Details for liquidpy-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for liquidpy 0.6.2
File Interpreter ABI Platform Actions
liquidpy-0.6.2-py3-none-any.whl Python 3 none any Details for liquidpy-0.6.2-py3-none-any.whl

Total release size: 107.4 kB

Release files / liquidpy-0.6.2.tar.gz

Download URL liquidpy-0.6.2.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2a035c3d989ea921800b407d2218c9a75d2025d1dd5b56e80300c310d4174c8
BLAKE2b-256 checksum
How to use checksums
5c4e5d7f92c87e1ec12070dd067f0ec2dbf2f67199e86c37e70045177fdd922e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure

Release files / liquidpy-0.6.2-py3-none-any.whl

Download URL liquidpy-0.6.2-py3-none-any.whl
Size 63.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
535e6da26722941efd0d9af3b2a1582cb4c07f789b2be8bf3b2c906819315f3b
BLAKE2b-256 checksum
How to use checksums
6232d53165733cf8b6401cbddb8b3d48a4b31500f7e9ac0882b1173b551d6cea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure

Security for liquidpy 0.6.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.6.2 This release

2 release files No 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