A port of liquid template engine for python
` .. image:: https://img.shields.io/pypi/v/liquidpy.svg?style=flat-square
target: https://img.shields.io/pypi/v/liquidpy.svg?style=flat-square alt: Pypi
pip install liquidpy
from liquid import Liquid
liq = Liquid('{{a}}')
ret = liq.render(a = 1)
# ret == '1'
# load template from a file
liq = Liquid('/path/to/template', liquid_from_file=True)
With environments:
liq = Liquid('{{a | os.path.basename}}', os=__import__('os'))
ret = liq.render(a="path/to/file.txt")
# ret == 'file.txt'