Skip to main content

Mustache v1.3 implementation with lambdas.

Project description

combustache

Mustache v1.3 implementation with lambdas.

Usable both in code and as CLI. To render a mustache template use combustache.render. Processed templates are cached; to clear cache use combustache.cache_clear.

Installation

From PyPI:

pip install combustache

From git:

pip install git+https://github.com/sakhezech/combustache

Usage

Typical usage in code

>>> import combustache
>>> template = 'Hello my name is {{>fancy_name}}!'
>>> partials = {'fancy_name': '-> {{name}} <-'}
>>> data = {'name': 'Anahit'}
>>> combustache.render(template, data, partials)
'Hello my name is -> Anahit <-!'

Typical usage as CLI

combustache ... or python -m combustache ...

For more info use combustache -h.

$ curl https://end.point/v1/api | combustache template.txt -o out.txt
$ cat out.txt
Hello world!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

combustache-1.0.0-py2.py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page