{"id":15628988,"url":"https://github.com/pwwang/liquidpy","last_synced_at":"2025-05-07T04:10:35.280Z","repository":{"id":33005803,"uuid":"148915076","full_name":"pwwang/liquidpy","owner":"pwwang","description":"A port of liquid template engine for python","archived":false,"fork":false,"pushed_at":"2025-03-08T06:15:32.000Z","size":1290,"stargazers_count":57,"open_issues_count":0,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-15T07:02:48.740Z","etag":null,"topics":["jekyll","jinja2","liquid","liquid-templating-engine","python","shopify","template-engine"],"latest_commit_sha":null,"homepage":"https://pwwang.github.io/liquidpy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-15T15:35:41.000Z","updated_at":"2025-03-08T06:14:45.000Z","dependencies_parsed_at":"2024-01-13T15:37:41.130Z","dependency_job_id":null,"html_url":"https://github.com/pwwang/liquidpy","commit_stats":{"total_commits":136,"total_committers":3,"mean_commits":"45.333333333333336","dds":"0.16176470588235292","last_synced_commit":"d6d7518418782c6cd2150a73929ce97f7d34a4cb"},"previous_names":[],"tags_count":30,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwwang%2Fliquidpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwwang%2Fliquidpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwwang%2Fliquidpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwwang%2Fliquidpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwwang","download_url":"https://codeload.github.com/pwwang/liquidpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jekyll","jinja2","liquid","liquid-templating-engine","python","shopify","template-engine"],"created_at":"2024-10-03T10:25:14.190Z","updated_at":"2025-05-07T04:10:35.252Z","avatar_url":"https://github.com/pwwang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# liquidpy\nA port of [liquid][19] template engine for python, on the shoulder of [jinja2][17]\n\n[![Pypi][2]][9] [![Github][3]][10] [![PythonVers][4]][9] [![Docs building][13]][11] [![Travis building][5]][11] [![Codacy][6]][12] [![Codacy coverage][7]][12]\n\n## Install\n```shell\npip install -U liquidpy\n```\n\n## Playground\n\nPowered by [pyscript][21]:\n\n[https://pwwang.github.io/liquidpy/playground][22]\n\n## Baisic usage\n\n### Loading a template\n```python\nfrom liquid import Liquid\nliq = Liquid('{{a}}', from_file=False)\nret = liq.render(a = 1)\n# ret == '1'\n\n# load template from a file\nliq = Liquid('/path/to/template.html')\n```\n\nUsing jinja's environment\n```python\nfrom jinja2 import Environment, FileSystemLoader\nenv = Environment(loader=FileSystemLoader('./'), ...)\n\nliq = Liquid.from_env(\"/path/to/template.html\", env)\n```\n\n### Switching to a different mode\n\n```python\nliq = Liquid(\n    \"\"\"\n    {% python %}\n    from os import path\n    filename = path.join(\"a\", \"b\")\n    {% endpython %}\n    {{filename}}\n    \"\"\",\n    mode=\"wild\" # supported: standard(default), jekyll, shopify, wild\n)\nliq.render()\n# 'a/b'\n```\n\n### Changing default options\n\n```python\nfrom liquid import defaults, Liquid\ndefaults.FROM_FILE = False\ndefaults.MODE = 'wild'\n\n# no need to pass from_file and mode anymore\nliq = Liquid('{% from_ os import path %}{{path.basename(\"a/b.txt\")}}')\nliq.render()\n# 'b.txt'\n```\n\n\n## Documentation\n\n- [Liquidpy's documentation][8]\n- [Liquid documentation (standard)][19]\n- [Liquid documentation (jekyll)][18]\n- [Liquid documentation (shopify-extended)][1]\n- [Jinja2's documentation][20]\n\n\n[1]: https://shopify.dev/api/liquid\n[2]: https://img.shields.io/pypi/v/liquidpy.svg?style=flat-square\n[3]: https://img.shields.io/github/tag/pwwang/liquidpy.svg?style=flat-square\n[4]: https://img.shields.io/pypi/pyversions/liquidpy.svg?style=flat-square\n[5]: https://img.shields.io/github/actions/workflow/status/pwwang/liquidpy/build.yml?style=flat-square\n[6]: https://img.shields.io/codacy/grade/aed04c099cbe42dabda2b42bae557fa4?style=flat-square\n[7]: https://img.shields.io/codacy/coverage/aed04c099cbe42dabda2b42bae557fa4?style=flat-square\n[8]: https://pwwang.github.io/liquidpy\n[9]: https://pypi.org/project/liquidpy/\n[10]: https://github.com/pwwang/liquidpy\n[11]: https://github.com/pwwang/liquidpy/actions\n[12]: https://app.codacy.com/gh/pwwang/liquidpy/dashboard\n[13]: https://img.shields.io/github/actions/workflow/status/pwwang/liquidpy/docs.yml?style=flat-square\n[14]: https://github.com/pwwang/liquidpy/tree/lark\n[15]: https://github.com/pwwang/liquidpy/tree/larkone\n[16]: https://github.com/pwwang/liquidpy/issues/22\n[17]: https://jinja.palletsprojects.com/\n[18]: https://jekyllrb.com/docs/liquid/\n[19]: https://shopify.github.io/liquid/\n[20]: https://jinja.palletsprojects.com/\n[21]: https://pyscript.net/\n[22]: https://pwwang.github.io/liquidpy/playground\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwwang%2Fliquidpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwwang%2Fliquidpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwwang%2Fliquidpy/lists"}