Skip to main content

A super-fast templating language that borrows the best ideas from the existing templating languages.

Project description

Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako’s syntax and API borrows from the best ideas of many others, including Django templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics.

Nutshell

<%inherit file="base.html"/>
<%
    rows = [[v for v in range(0,10)] for row in range(0,10)]
%>
<table>
    % for row in rows:
        ${makerow(row)}
    % endfor
</table>

<%def name="makerow(row)">
    <tr>
    % for name in row:
        <td>${name}</td>\
    % endfor
    </tr>
</%def>

Philosophy

Python is a great scripting language. Don’t reinvent the wheel…your templates can handle it !

Documentation

See documentation for Mako at https://docs.makotemplates.org/en/latest/

License

Mako is licensed under an MIT-style license (see LICENSE). Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

Mako-1.3.5.tar.gz (392.7 kB view details)

Uploaded Source

Built Distribution

Mako-1.3.5-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file Mako-1.3.5.tar.gz.

File metadata

  • Download URL: Mako-1.3.5.tar.gz
  • Upload date:
  • Size: 392.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for Mako-1.3.5.tar.gz
Algorithm Hash digest
SHA256 48dbc20568c1d276a2698b36d968fa76161bf127194907ea6fc594fa81f943bc
MD5 0cf9ef37c1f8ffd453ef2b2a3a5573b3
BLAKE2b-256 6703fb5ba97ff65ce64f6d35b582aacffc26b693a98053fa831ab43a437cbddb

See more details on using hashes here.

File details

Details for the file Mako-1.3.5-py3-none-any.whl.

File metadata

  • Download URL: Mako-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for Mako-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 260f1dbc3a519453a9c856dedfe4beb4e50bd5a26d96386cb6c80856556bb91a
MD5 1bae109a4274b4a8c481f8a38d416d57
BLAKE2b-256 036270f5a0c2dd208f9f3f2f9afd103aec42ee4d9ad2401d78342f75e9b8da36

See more details on using hashes here.

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