A Python implementation of the {{mustache}} templating language. Still a work in progress, but core rendering features are working (issues are with partials and delimiter swap). A spiritual successor to chevron.
I'm glad you asked!
Included microbenchmarks show mystace heavily outperforming all other libraries tested.
Mystace passes nearly all the unit provided by the {{mustache}} spec. To see which tests are currently not passing, see the spec test file.
Currently a work in progress. The core rendering logic is solid, but still working out bugs with a few test cases. If there is community interest and people will find this useful, I will find time to get the rest of test cases working. As is, I am happy to review pull requests and write test cases.
Python usage with strings
import mystace
mystace.render('Hello, {{ mustache }}!', {'mustache': 'World'})
Python usage with data structure
import mystace
template_str = 'Hello, {{ mustache }}!'
template_renderer = mystace.MustacheRenderer.from_template(template_str)
template_renderer.render({'mustache': 'World'})
template_renderer.render({'mustache': 'Dave'})
$ pip install mystace
- get fully spec compliant
- get popular
- have people complain
- fix those complaints