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

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.4
File Size Uploaded Provenance Actions
liquidpy-0.6.4.tar.gz 44.1 kB Without provenance Details for liquidpy-0.6.4.tar.gz

Built distribution (wheel)

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

Total release size: 108.0 kB

Release files / liquidpy-0.6.4.tar.gz

Download URL liquidpy-0.6.4.tar.gz
Size 44.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9a123aad8765086146d96a5a0b38cbae06565b741d6fde8f87290afdbe1ff0cf
BLAKE2b-256 checksum
How to use checksums
f1e32aff4530151eb29a4e34ca7d595b741a57a2374395164c2d9796aaef97cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Linux/5.8.0-1039-azure

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

Download URL liquidpy-0.6.4-py3-none-any.whl
Size 64.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcdd2c4d164210a74083c8d4326c1cade506a5be38f61ac786f5a24454a8004b
BLAKE2b-256 checksum
How to use checksums
dae5f94b9b90a8260b36cf7d0329e6cd616121146180c2315ab697621fc172c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Linux/5.8.0-1039-azure

Security for liquidpy 0.6.4

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