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 details)

Uploaded Source

File details

Details for the file mako_sugar-0.1.0.tar.gz.

File metadata

  • Download URL: mako_sugar-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mako_sugar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 558891ac05238dbec4052232a4057734362f4e1ecf03e3ac25829d26c94e6390
MD5 6d3421f19eb36c43f457bed29f77bd34
BLAKE2b-256 9712208d0b9e6c6120d413d50b2db2e13c16016d35a788be84cc33f5fcb3835d

See more details on using hashes here.

Supported by

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