The aiohttp (http://aiohttp.readthedocs.io/) framework is a popular asynchronous framework based on the asyncio library, which has been around since the first days of the library.
Like Flask, it provides a request object and a router to redirect queries to functions that handle them.
The asyncio library's event loop is wrapped into an Application object, which handles most of the orchestration work. As a microservice developer, you can just focus on building your views as you would do with Flask.
In the following example, the api() coroutine returns some JSON response when the application is called on /api:
from aiohttp import web async def api(request): return web.json_response({'some': 'data'}) app = web.Application() app.router.add_get('/api', api) web.run_app(app)
The aiohttp framework...