from flask import Flask, jsonify, request import database def createApp(): return Flask(__name__) def createRoutes(app, connector): @app.route("/", methods=['GET']) def hello_world(): arg1 = request.args.get('arg1') arg2 = request.args.get('arg2') return jsonify({'arg1': arg1, 'arg2': arg2}) @app.route("/db", methods=['GET']) def database_hello(): return jsonify( database.runQuery( connector, "SHOW DATABASES" ) )