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 1.0.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 1.0.1
File Size Uploaded Provenance
Mako-1.0.1.tar.gz 473.3 kB Without provenance Details

Release files / Mako-1.0.1.tar.gz

Download URL Mako-1.0.1.tar.gz
Size 473.3 kB
Tags Source
SHA-256 checksum
How to use checksums
45f0869febea59dab7efd256fb451c377cbb7947bef386ff0bb44627c31a8d1c
BLAKE2b-256 checksum
How to use checksums
8ea4aa56533ecaa5f22ca92428f74e074d0c9337282933c722391902c8f9e0f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Mako 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.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