--- id: pystache version: "0.6.8" license: Copyright (C) 2012 Chris Jerdonek. All rights reserved. Copyright (c) 2009 Chris Wanstrath Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # pystache — Mustache for Python License: permissive · Maintenance: aging · Downloads: 4.2M/mo ## What it is and what it does Pystache is a Python implementation of Mustache, a framework-agnostic templating language designed to enforce separation of logic from presentation. It renders templates by interpolating values from Python dictionaries or objects into template strings, supporting sections, conditionals, and iteration through a simple, readable syntax. The package passes the full Mustache specification (version 1.1.3) and handles both simple string rendering and more complex view-based templates through its Renderer class. The package is designed for scenarios where you want to keep templates free of application logic—Mustache makes it impossible to embed conditional or looping code in templates themselves. It supports Unicode internally and provides configurable encoding handling for file and string inputs. Pystache works across Linux, macOS, and Windows, with tested support for Python 3.8 through 3.13. Use it for: - Render email templates or HTML documents with variable substitution from Python data structures. - Generate configuration files or code from templates without embedding logic in the template itself. - Build view classes that provide data to templates while keeping presentation logic separate from business logic. - Pre-parse templates once and render them multiple times with different context data. - Command-line template rendering when JSON or YAML context files are available. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pystache renders Mustache templates—a logic-free templating system that separates presentation from application logic—using Python dictionaries and objects as context. Yes, if you need a simple, logic-free templating system. Pystache is stable, permissively licensed, and has no known vulnerabilities. The aging maintenance status (514 days since last release) is not a blocker for a mature, spec-compliant library, but consider it if you need active development or frequent updates. Low install friction and broad Python version support make it a practical choice for projects prioritizing template simplicity over feature richness. ## Install pip install pystache uv add pystache poetry add pystache ## Installing pystache Before you install: Low install friction with a single runtime dependency (importlib-metadata). Maintenance status is aging—last release was 514 days ago—but the repository remains active and the package is marked Production/Stable. Tested across Python 3.8 through 3.13. License in practice: MIT license (permissive). You can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions, provided you include the original copyright notice. Quickstart: pip install pystache import pystache print(pystache.render('Hi {{person}}!', {'person': 'Mom'})) # Output: Hi Mom! Requires Python 3.8 or later. Verify before relying: - Whether the aging maintenance status (514 days since last release) affects practical usability for new projects. - Performance characteristics compared to other Python templating engines for high-volume rendering. ## Package facts - License: Copyright (C) 2012 Chris Jerdonek. All rights reserved. Copyright (c) 2009 Chris Wanstrath Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 4.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mustache template rendering python, logic-free templating system, python template engine, mustache implementation, template rendering with context, string interpolation templates, view-based template rendering, templating, mustache, logic-free [View on SkillFed](https://skillfed.io/packages/pystache) · [View on PyPI](https://pypi.org/project/pystache/)