chevron
Mustache templating language renderer
What it is and what it does
Chevron is a Python implementation of the Mustache templating language, a logic-less template syntax that separates presentation from data. It takes a template string (or file) containing Mustache syntax and a data dictionary, then renders the template by substituting variables, iterating over lists, and invoking partials and lambda functions.
The package is designed to be spec-compliant with the official Mustache specification and offers both a Python API and a command-line interface. It supports partials (template includes) loaded from dictionaries or the filesystem, custom delimiters, and lambda functions for conditional or computed template logic. With no runtime dependencies, it installs cleanly and runs as a pure Python module.
Use it for:
- Generate HTML emails or documents from templates and dynamic data in web applications.
- Render configuration files or code templates from data structures in build or deployment scripts.
- Build command-line tools that produce formatted output using Mustache templates and JSON data.
- Create reusable template libraries with partials for consistent document or UI generation.
- Implement simple report or invoice generation by combining template files with structured data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Chevron renders Mustache templates in Python, converting template strings with data into final output. It supports partials, custom delimiters, and lambda functions for dynamic template logic.
Yes, if you need a lightweight, spec-compliant Mustache renderer with no dependencies and your project does not require active maintenance. The package is stable and well-tested, but it is abandoned—no updates since 2021. Choose it for simple templating tasks where you control the template syntax and do not expect future feature requests or bug fixes. For active development or complex templating needs, consider a maintained alternative.
Install
chevron on PyPI
pip
pip install chevronuv
uv add chevronpoetry
poetry add chevronInstalling chevron
Before you install
Installation is straightforward with no runtime dependencies. However, the project is abandoned—last release was 2021-01-02 and no commits since 2023-08-24. While the codebase is stable and spec-compliant, expect no maintenance or bug fixes going forward.
License in practice
MIT license is permissive and imposes minimal restrictions. You may use, modify, and distribute chevron freely in commercial or private projects, provided you retain the license notice.
Quickstart
import chevron
chevron.render('Hello, {{ name }}!', {'name': 'World'})
# With partials from filesystem
chevron.render('{{> header }}', partials_path='partials/', partials_ext='mustache')
Verify before relying
- Whether Python 2 support (2.6, 2.7) remains relevant for your project, given modern Python ecosystem shifts.
- Current compatibility with Python versions beyond 3.6, which was the latest tested version listed in the fact sheet.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,050 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 15,017,857/month — #1,203 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: chevron-0.14.0-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
pystachePystache renders Mustache templates—a…
permissive · top 5,000 on PyPI
types-chevronProvides type hints for the chevron Mustache…
permissive · top 15,000 on PyPI
pybars3Pybars3 compiles and renders Handlebars.js…
copyleft · top 15,000 on PyPI
pybars4Pybars4 compiles and renders Handlebars.js…
copyleft · top 15,000 on PyPI
django-template-partialsProvides reusable named template partials for…
permissive · top 15,000 on PyPI
jinja_partialsAdds a `render_partial()` function to Jinja2…
permissive · top 5,000 on PyPI
html5taggerGenerates HTML5 markup programmatically using…
permissive · top 5,000 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
python-liquidPython Liquid is a template engine that renders…
permissive · top 5,000 on PyPI
pyramid-makoIntegrates the Mako templating engine with the…
permissive · top 5,000 on PyPI