Skip to main content

Mako Templates for Python

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 http://www.makotemplates.org/docs/

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.

Metadata

Release files for Mako 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Mako 0.9.1
File Size Uploaded Provenance Actions
Mako-0.9.1.tar.gz 421.1 kB Without provenance Details for Mako-0.9.1.tar.gz

Release files / Mako-0.9.1.tar.gz

Download URL Mako-0.9.1.tar.gz
Size 421.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ed74d72b720a97a51590dfa839f2048ceeb76cc80d1d9ea5731a5262384316ae
BLAKE2b-256 checksum
How to use checksums
617d752bd373eb816b744a979ba211ef4ce1871a917ab926a32991e231be3b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Mako 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page