importjsonimportaiomysqlimporttornadoclassEmpHandler(tornado.web.RequestHandler):asyncdefget(self,*args,**kwargs):asyncwithself.settings['mysql'].cursor(aiomysql.DictCursor)ascursor:awaitcursor.execute("select eno as no, ename as name, job, sal, intro from tb_emp")emps=list(awaitcursor.fetchall())self.finish(json.dumps(emps))