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 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.
Release files for Mako 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mako-1.4.2.tar.gz | 412.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mako-1.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 492.4 kB
Release files / mako-1.4.2.tar.gz
| Download URL | mako-1.4.2.tar.gz |
|---|---|
| Size | 412.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7227a060ee3af55a493af61d73d6beef13044b81dba9586736c13945f09464ce
|
|
BLAKE2b-256 checksum How to use checksums |
057f0b891a82379ffd96d2d8cc6d435fb1055cdaed52829287f81d2a43fd71cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / mako-1.4.2-py3-none-any.whl
| Download URL | mako-1.4.2-py3-none-any.whl |
|---|---|
| Size | 80.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e70a2a4308952b33a21208bfd6725da79fae5a8c224578f8cfdeb60e5ace03df
|
|
BLAKE2b-256 checksum How to use checksums |
f0bb0e4c30a18858adebc75496ea8a8c3fb65cbf4b36ea1c5028ed8a0a5fa196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|