Liquidpy
A port of liquid template engine for python
Install / Use
/learn @pwwang/LiquidpyREADME
liquidpy
A port of liquid template engine for python, on the shoulders of jinja2
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
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
106.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
345.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
