Mako

Mako is a template engine built in Python that is used to generate output HTML, XML and similar formats.

Mako template engine logo.

Mako is an implementation of the template engines concept. Learn more in the web development chapter or view the table of contents for all topics.

Mako resources

  • Exploring Mako explains a bit about the template engines Myghty and Mason, which influenced Mako's design. The post then shows a few basic examples for how to use Mako.

  • Configuration Templates with Python and Mako shows some basic situations for how to use Mako in an example project.

  • Flask-Mako is a Flask extension that makes it easier to use Mako as the template engine in your Flask web app projects.

  • The Stack Overflow question on What is the fastest template system for Python? provides some basic benchmarks comparing Mako, Jinja and other template engines. Any benchmark should be taken as a data point rather than a rule on which engine is actually the fastest in real world scenarios. In addition, if you are using Mako or any other template engine as part of a static website generator then it will not really matter which one is the fastest because the output is created before the website is deployed rather than during the web server's HTTP request-response cycle.

详细了解模板引擎或其他主题?

什么是模板引擎,为什么它们有用?

我想学习如何用框架创建 Python Web 应用。

我已经创建了一个 Python Web 应用,那我该如何部署呢?

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.

Sponsored By

Rollbar logo

Fix errors in your Python code before your users see them by monitoring with Rollbar.

Learn More Python

Introduction to Ansible video course logo.

Deploy web apps with the Ansible configuration management tool.


TestDriven logo

Build microservices with Docker, Flask & React in this great course.

Full Stack Python

Full Stack Python is an open book that explains concepts in plain language and provides helpful resources for those topics.
Updates via newsletter, Twitter & Facebook.