from flask import Blueprint, jsonify from mysql_db import MysqlDB online_blue = Blueprint('online_blue', __name__) @online_blue.route('/online', methods=['POST', 'GET']) def online(): db = MysqlDB('linshi', 1) result = db.select('select * from report_push_customer_info limit 10') return jsonify(result)