Skip to main content

Syntax sugar for Python Mako templates

Project description

Mako Sugar
===

A preprocessor that adds some syntactic sugar to Mako templates.

Write:

% call foo():
hi
% endcall

instead of:

<%call expr="foo()">
hi
</%call>

Install with:

from mako_sugar import sugar

# Any one of these options...
t = Template(..., preprocessor=sugar())
t = Template(..., preprocess=sugar(exclude=['def', 'call', 'import']))
TemplateLookup(preprocessor=sugar())

Project details


Download files

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

Source Distribution

mako_sugar-0.1.0.tar.gz (3.7 kB view hashes)

Uploaded Source

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