Actually, I come to the completion of the service logging, which, in fact, receives texts from one service, processes it secondly and stores the results in the database. Accordingly, since most of the time it must wait for a response from other services, it would asynchronous (async / await was introduced in python3.5).
Now you need to fasten to this webmord (1 type of non-parameterized requests, 1 - parameterized). I think to tornado. I started with a simple:
from tornado.httpserver import HTTPServer from tornado.platform.asyncio import AsyncIOMainLoop from tornado.web import Application, RequestHandler, asynchronous from asyncio import sleep class Handler(RequestHandler): async def get(self): print("Started") await sleep(10) self.write("Hello, world!") self.finish() if __name__ == '__main__': HTTPServer(Application( [('/', Handler,)] )).listen(8888) AsyncIOMainLoop.instance().start() Accordingly, I make 2 requests for 127.0.0.1:8888/ with an interval of less than 20 seconds, the execution of both starts, but I do not receive an answer.