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.3

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.3
File Size Uploaded Provenance Actions
liquidpy-0.6.3.tar.gz 43.9 kB Without provenance Details for liquidpy-0.6.3.tar.gz

Built distribution (wheel)

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

Total release size: 107.8 kB

Release files / liquidpy-0.6.3.tar.gz

Download URL liquidpy-0.6.3.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9d9926fc1fa700c88135f84c15130f0d33c189c021972c04b0f9c1fa5554f300
BLAKE2b-256 checksum
How to use checksums
0bd3983aab1ba33e2187f984f406ff1e746ddb33a230ce3f6a638b5090e8cb11
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.3-py3-none-any.whl

Download URL liquidpy-0.6.3-py3-none-any.whl
Size 63.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c37e3b0a2363848e87e89f17a33e8c42b43f16fea7620d2c55258869e511297
BLAKE2b-256 checksum
How to use checksums
fd58e44b2cd6d476e2f33e69f8cd0c27d892a7394f29f4057ae45be172349e05
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.3

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.3 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