About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconMako Publisher's description

Mako is a template library written in 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.


* Super-simple API. For basic usage, just one class, Template is needed:

from mako.template import Template
print Template("hello ${data}!").render(data="world")

For filesystem management and template caching, add the TemplateLookup class.
* Insanely Fast. An included bench suite, adapted from a suite included with Genshi, has these results for a simple three-sectioned layout:
Mako: 1.10 ms Myghty: 4.52 ms
Cheetah: 1.10 ms Genshi: 11.46 ms
Django: 2.74 ms Kid: 14.54 ms
Since a speed test is always a flashpoint for controversy, and you can modify the bench to show different variances, the point here is not that "Mako is faster"; its not meant as a competitive point. The point is, "Mako is as fast as any of the other currently popular approaches".
* Standard template features
o control structures constructed from real Python code (i.e. loops, conditionals)
o straight Python blocks, inline or at the module-level
o plain old includes
* Callable blocks
o can access variables from their enclosing scope as well as the template's request context
o can be nested arbitrarily
o can specify regular Python argument signatures
o outer-level callable blocks can be called by other templates or controller code (i.e. "method call")
o Calls to functions can define any number of sub-blocks of content which are accessible to the called function (i.e. "component-call-with-content"). This is the basis for nestable custom tags.
* Inheritance
o supports "multi-zoned" inheritance - define any number of areas in the base template to be overridden.
o supports "chaining" style inheritance - call next.body() to call the "inner" content.
o the full inheritance hierarchy is navigable in both directions (i.e. parent and child) from anywhere in the chain.
o inheritance is dynamic ! Specify a function instead of a filename to calculate inheritance on the fly for every request.

System Requirements:

В· Python
Program Release Status: Minor Update
Program Install Support: Install and Uninstall

Is Mako your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)