All Projects → aio-libs → aiohttp-mako

aio-libs / aiohttp-mako

Licence: Apache-2.0 license
mako template renderer for aiohttp.web

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to aiohttp-mako

Arsenic
Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Stars: ✭ 209 (+553.13%)
Mutual labels:  aiohttp, asyncio
trellio
Python3 asyncio based microframework for microservice architecture
Stars: ✭ 19 (-40.62%)
Mutual labels:  aiohttp, asyncio
Tokio
Asyncio event loop written in Rust language
Stars: ✭ 236 (+637.5%)
Mutual labels:  aiohttp, asyncio
Aiohttp admin
admin interface for aiohttp application http://aiohttp-admin.readthedocs.io
Stars: ✭ 207 (+546.88%)
Mutual labels:  aiohttp, asyncio
python3-concurrency
Python3爬虫系列的理论验证,首先研究I/O模型,分别用Python实现了blocking I/O、nonblocking I/O、I/O multiplexing各模型下的TCP服务端和客户端。然后,研究同步I/O操作(依序下载、多进程并发、多线程并发)和异步I/O(asyncio)之间的效率差别
Stars: ✭ 49 (+53.13%)
Mutual labels:  aiohttp, asyncio
Create Aio App
The boilerplate for aiohttp. Quick setup for your asynchronous web service.
Stars: ✭ 207 (+546.88%)
Mutual labels:  aiohttp, asyncio
aioneo4j
asyncio client for neo4j
Stars: ✭ 29 (-9.37%)
Mutual labels:  aiohttp, asyncio
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (+493.75%)
Mutual labels:  aiohttp, asyncio
python-logi-circle
Python 3.6+ API for Logi Circle cameras
Stars: ✭ 23 (-28.12%)
Mutual labels:  aiohttp, asyncio
pytest-aiohttp
pytest plugin for aiohttp support
Stars: ✭ 110 (+243.75%)
Mutual labels:  aiohttp, asyncio
Aiohttp Devtools
dev tools for aiohttp
Stars: ✭ 202 (+531.25%)
Mutual labels:  aiohttp, asyncio
netunnel
A tool to create network tunnels over HTTP/S written in Python 3
Stars: ✭ 19 (-40.62%)
Mutual labels:  aiohttp, asyncio
Aiohttp Security
auth and permissions for aiohttp
Stars: ✭ 195 (+509.38%)
Mutual labels:  aiohttp, asyncio
Python Mocket
a socket mock framework - for all kinds of socket animals, web-clients included
Stars: ✭ 209 (+553.13%)
Mutual labels:  aiohttp, asyncio
Fooproxy
稳健高效的评分制-针对性- IP代理池 + API服务,可以自己插入采集器进行代理IP的爬取,针对你的爬虫的一个或多个目标网站分别生成有效的IP代理数据库,支持MongoDB 4.0 使用 Python3.7(Scored IP proxy pool ,customise proxy data crawler can be added anytime)
Stars: ✭ 195 (+509.38%)
Mutual labels:  aiohttp, asyncio
aioScrapy
基于asyncio与aiohttp的异步协程爬虫框架 欢迎Star
Stars: ✭ 34 (+6.25%)
Mutual labels:  aiohttp, asyncio
Aiohttp Jinja2
jinja2 template renderer for aiohttp.web
Stars: ✭ 180 (+462.5%)
Mutual labels:  aiohttp, asyncio
Aiohttp Debugtoolbar
aiohttp_debugtoolbar is library for debugtoolbar support for aiohttp
Stars: ✭ 183 (+471.88%)
Mutual labels:  aiohttp, asyncio
yutto
🧊 一个可爱且任性的 B 站视频下载器(bilili V2)
Stars: ✭ 383 (+1096.88%)
Mutual labels:  aiohttp, asyncio
tomodachi
💻 Microservice library / framework using Python's asyncio event loop with full support for HTTP + WebSockets, AWS SNS+SQS, RabbitMQ / AMQP, middleware, etc. Extendable for GraphQL, protobuf, gRPC, among other technologies.
Stars: ✭ 170 (+431.25%)
Mutual labels:  aiohttp, asyncio

aiohttp_mako

https://travis-ci.com/aio-libs/aiohttp-mako.svg?branch=master Chat on Gitter

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.

Example

import asyncio
import aiohttp_mako
from aiohttp import web


@aiohttp_mako.template('index.html')
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',
                                output_encoding='utf-8',
                                default_filters=['decode.utf8'])
    template = """<html><body><h1>${head}</h1>${text}</body></html>"""
    lookup.put_string('index.html', template)

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

loop = asyncio.get_event_loop()
app = loop.run_until_complete(init(loop))
web.run_app(app, host='127.0.0.1', port=9000)

License

aiohttp_mako is offered under the Apache 2 license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].