finds.dev← search

// the find

defunkt/pystache

★ 1,314 · Python · MIT · updated Sep 2021

Mustache in Python

Pystache is a Python implementation of Mustache, the logic-free templating language. It's aimed at people who want strict separation between templates and application code, e.g. porting a Ruby/JS Mustache setup to Python, or anyone who wants a spec-compliant Mustache engine rather than a Python-flavored templating DSL.

It passes the full Mustache spec (tested against v1.1.2), which is a real signal of correctness rather than 'mostly works.' The API is small and predictable: pystache.render() for one-offs, a Renderer class for shared config, and pre-parsing (pystache.parse) so a template can be compiled once and rendered many times against different contexts. TemplateSpec gives you a clean way to bind a view class to its template file without hardcoding paths.

Last push was 2021-09-30 and the codebase is written for Python 2 with Python 3 support bolted on via 2to3 conversion at build time — that's not how anyone ships Python 3 code today, and it means the actual source you read in the repo isn't what runs on Python 3. Documented support for Python 2.4 through 3.3 and dependencies like simplejson pinned to decade-old versions tell you this hasn't been touched in the modern packaging/typing era — no type hints, no pyproject.toml. The mailing list link (librelist) is dead infrastructure, and there's no indication of an active maintainer to file issues against or expect security fixes from.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →