Run Flask app with aiohttp and uvloop hello_world.py """Simple demo of using Flask with aiohttp via aiohttp-wsgi's WSGIHandler. """ import asyncio from aiohttp import web from aiohttp_wsgi import WSGIHandler from flask import Flask app = Flask('aioflask') app.config['DEBUG'] = True aio_app = web.Application() wsgi = WSGIHandler(app) aio_app.router.add_route('*', '/{path_info: *}', wsgi.handle_request) @app.route('/') def index(): return 'hello world!' pip3 install uvloop aiohttp flask aiohttp-wsgi gunicorn gunicorn -k aiohttp.worker.GunicornUVLoopWebWorker -b 127.0.0.1:5000 hello_world:aio_app