Install
pip install -U liquidpy
Playground
Powered by pyscript:
https://pwwang.github.io/liquidpy/playground
Baisic usage
Loading a template
from liquid import Liquid
liq = Liquid('{{a}}', from_file=False)
ret = liq.render(a = 1)
# ret == '1'
# load template from a file
liq = Liquid('/path/to/template.html')
Using jinja's environment
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('./'), ...)
liq = Liquid.from_env("/path/to/template.html", env)
Switching to a different mode
liq = Liquid(
"""
{% python %}
from os import path
filename = path.join("a", "b")
{% endpython %}
{{filename}}
""",
mode="wild" # supported: standard(default), jekyll, shopify, wild
)
liq.render()
# 'a/b'
Changing default options
from liquid import defaults, Liquid
defaults.FROM_FILE = False
defaults.MODE = 'wild'
# no need to pass from_file and mode anymore
liq = Liquid('{% from_ os import path %}{{path.basename("a/b.txt")}}')
liq.render()
# 'b.txt'
Documentation
Metadata
Release files for liquidpy 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liquidpy-0.10.0.tar.gz | 180.5 kB | Without provenance | Details for liquidpy-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liquidpy-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for liquidpy-0.10.0-py3-none-any.whl |
Total release size: 213.8 kB
Release files / liquidpy-0.10.0.tar.gz
| Download URL | liquidpy-0.10.0.tar.gz |
|---|---|
| Size | 180.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26fe12b666a321890722ac845968f53cfeb2c731557fe8e6d130b06178e7ac14
|
|
BLAKE2b-256 checksum How to use checksums |
82d119e9c8eb8290d4213b656788aeb7f90b55ce38771a1400f376a7aed28acf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / liquidpy-0.10.0-py3-none-any.whl
| Download URL | liquidpy-0.10.0-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c45fd239104a8a03d5c62d6c1d951d93368bb80cb75802920de44932a062f06
|
|
BLAKE2b-256 checksum How to use checksums |
b2ae68894af913648cc02fb371b752c8f8c63d44ffb11a04e9aabe14ea6ac536
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for liquidpy 0.10.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.