• Active Topics 

Mako Templates for Python

Including Cython, Jython, IronPython, PyPy, Django framework, and interpreters: Ipython, IPython Jupyter/Notebook, CPython


Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5219
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

Mako preprocessor is a very powerful template system written in Python and maintained under the MIT License . Conceptually, Mako is an embedded Python (that's, 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.

With Mako you can automatically generate various types of text and steer the generation through Python code embedded in the DocOnce. DocOnce will detect if Mako commands are used and run the preprocessor prior to translating the DocOnce source to a specific format.

Mako 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 and Jinja2 templates, Cheetah, Myghty, and Genshi.

Mako is used by Reddit where it delivers over one billion page views per month (Ref). It is the default template language included with the Pylons and Pyramid web frameworks Nutshell. For more details, consult documentation.

You can download Mako from here and easily install it by using pip:

Code: Select all

pip install Mako
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Python Programming”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests