liquidpy
A port of liquid template engine for python
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
- Liquid's documentation
- Liquidpy's 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.1
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.6.1.tar.gz | 43.8 kB | Without provenance | Details for liquidpy-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liquidpy-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for liquidpy-0.6.1-py3-none-any.whl |
Total release size: 107.4 kB
Release files / liquidpy-0.6.1.tar.gz
| Download URL | liquidpy-0.6.1.tar.gz |
|---|---|
| Size | 43.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5d1d8ba9098c301185ad5a3d9b32c908c29f5551a32776e1d2d9bcacf63a952
|
|
BLAKE2b-256 checksum How to use checksums |
06158ce363247fad89e4b0b6db41b4ea4c19fda358502227e4c2e5c7f4273b99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.0 CPython/3.8.5 Linux/5.4.0-1025-azure
|
Release files / liquidpy-0.6.1-py3-none-any.whl
| Download URL | liquidpy-0.6.1-py3-none-any.whl |
|---|---|
| Size | 63.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e32b761a635e97626f5b87bb263cacb7b2b994ed167b64ab7e86421c43fdf14
|
|
BLAKE2b-256 checksum How to use checksums |
488627a0c84bc1883a0e138b56fcc87b3125f9baa071bfa6ad6050152af0591d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.0 CPython/3.8.5 Linux/5.4.0-1025-azure
|
Security for liquidpy 0.6.1
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.