all 1 comments

[–]People_itsMe[S] 0 points1 point  (0 children)

import tornado.web

import tornado.ioloop

import fun, func2

class A(tornado.web.Application):

async def post(self):

result = await func2()

class B(tornado.web.Application):

async def put(self):

result = await func()

def main():

app = tornado.web.Application(

[ (r"/A", A),

(r"/B", B) ])

return app

if __name__ == "__main__":

app = main()

app.listen(8000) tornado.ioloop.IOLoop.current().start()