from flask import Flask,request import mysql_search_utils app = Flask(__name__) @app.route('/hello') def helloWord(): print(request.path) print(request.full_path) return 'hello world' @app.route('/getOne') def getJson(): mysql = mysql_search_utils.mysqlSearchUtils() responseDict = {} data = mysql_search_utils.mysqlSearchUtils.get_one(mysql) responseDict["data"] = data return responseDict @app.route('/getList') def getList(): mysql = mysql_search_utils.mysqlSearchUtils(); responseDict = {} list = mysql_search_utils.mysqlSearchUtils.get_all(mysql) responseDict["list"] = list return responseDict if __name__ == '__main__': app.run(host='0.0.0.0',port=8079,debug=True)