python - Running aiohttp application as a coroutine -


i have asyncio app , want add simple rest api using aiohttp. far can see, can either create aiohttp app , run aiohttp.web.run_app on thread, or i'd have forget app , use lower level aiohttp.web.server api. there way can use aiohttp.web.application , run web application coroutine instead of using run_app?

just open source code aiohttp.web:run_app (https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web.py#l413-l467) , see how it's implemented.

you same do't call blocking loop.run_forever().


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -