--- id: python-liquid version: "2.3.1" license: MIT license_treatment: permissive maintenance: active --- # python-liquid — A Python engine for the Liquid template language. License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does Python Liquid is a Liquid template engine—a safe, expression-based template language originally from Shopify—implemented in pure Python. It parses and renders templates that contain variable placeholders, filters, control flow (if/for/unless), and other Liquid constructs, making it suitable for customer-facing or untrusted template input where you need safety guarantees that general-purpose Python code execution would not provide. The package offers two main entry points: a simple `render()` function for one-off template rendering, and an `Environment` class for managing multiple templates, configuring autoescape and template loaders, and reusing parsed templates. It follows Shopify's Liquid specification closely and validates against the Golden Liquid test suite. Runtime dependencies handle date/time operations (python-dateutil, pytz), internationalization (babel), HTML escaping (markupsafe), and resource loading (importlib-resources). Use it for: - Render user-supplied or customer-provided templates safely without executing arbitrary Python code - Generate HTML emails or documents from template files with variable substitution and conditional logic - Build a template-based reporting or document generation system with Shopify Liquid syntax - Migrate Liquid templates from Ruby or JavaScript environments to a Python backend - Implement a theme or customization system where end users write templates in a familiar, safe syntax ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python Liquid is a template engine that renders Liquid templates—a safe, customer-facing template language used by Shopify—from strings or files with variable substitution and control flow. Yes. Python Liquid is actively maintained, has no known vulnerabilities, installs with low friction, and is MIT-licensed. It is a solid choice if you need Liquid template rendering in Python—particularly if you are migrating from Shopify or another Liquid implementation, or if you need to safely render customer-supplied templates. The Golden Liquid test suite alignment is a strong signal of correctness. ## Install pip install python-liquid uv add python-liquid poetry add python-liquid ## Installing python-liquid Before you install: Low friction: pure Python wheel with five common runtime dependencies (babel, markupsafe, python-dateutil, pytz, importlib-resources). Actively maintained—last commit 2026-08-08, released 6 days ago. Supports Python 3.9 through 3.14 on CPython and PyPy. License in practice: MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions, provided you include the license notice. Quickstart: from liquid import render print(render("Hello, {{ you }}!", you="World")) # Hello, World! # Or parse once, render many times: from liquid import parse template = parse("Hello, {{ you }}!") print(template.render(you="World")) Verify before relying: - Performance characteristics compared to other Liquid implementations or template engines - Whether the Golden Liquid test suite coverage is complete or if edge cases remain - Support for custom filters, tags, or extensions beyond the standard Liquid spec ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags liquid template engine python, shopify liquid templates, safe template rendering, template language python, jinja alternative template, customer-facing templates, liquid syntax python, template-engine, shopify-liquid [View on SkillFed](https://skillfed.io/packages/python-liquid) · [View on PyPI](https://pypi.org/project/python-liquid/)