Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

mako template renderer for aiohttp.web (http server for asyncio)

Project Description

mako template renderer for aiohttp.web based on aiohttp_jinja2. Library has almost same api and support python 3.5 (PEP492) syntax. It is used in aiohttp_debugtoolbar.


import asyncio
import aiohttp_mako
from aiohttp import web

async def func(request):
    return {'head': 'aiohttp_mako', 'text': 'Hello World!'}

async def init(loop):
    app = web.Application(loop=loop)
    lookup = aiohttp_mako.setup(app, input_encoding='utf-8',
    template = """<html><body><h1>${head}</h1>${text}</body></html>"""
    lookup.put_string('index.html', template)

    app.router.add_route('GET', '/', func)

    handler = app.make_handler()
    srv = await loop.create_server(handler, '', 8080)
    print("Server started at")
    return srv, handler

loop = asyncio.get_event_loop()
srv, handler = loop.run_until_complete(init(loop))
except KeyboardInterrupt:


aiohttp_mako is offered under the Apache 2 license.

Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
aiohttp_mako-0.3.0-py3-none-any.whl (3.5 kB) Copy SHA256 Checksum SHA256 py3 Wheel Dec 14, 2016
aiohttp-mako-0.3.0.tar.gz (7.4 kB) Copy SHA256 Checksum SHA256 Source Dec 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting