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

Built distribution (wheel)

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

Total release size: 106.5 kB

Release files / liquidpy-0.6.0.tar.gz

Download URL liquidpy-0.6.0.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d7033a9ba0b98c9a5535d0e9aed353279a6b76d06f874c924c7aec38f1a503cb
BLAKE2b-256 checksum
How to use checksums
6efc5965990243c0ce98ef81ff019bffb75453b5eda2defc656bdd765c6012a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.7.1 Linux/4.15.0-1077-gcp

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

Download URL liquidpy-0.6.0-py3-none-any.whl
Size 63.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5c91c78f256787c0231e370d0beddb1f7298fb03a8ba3740364c46ee2c2428d
BLAKE2b-256 checksum
How to use checksums
230260b65b958256ab48955b7222a83e5c81a964966c36452af77a1406d6162a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.7.1 Linux/4.15.0-1077-gcp

Security for liquidpy 0.6.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.

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