api_func.py from flask import Flask,jsonify import test #my .py name app=Flask(name) @app.route("/") def myfuncname(param): ret = test.func(parm) return jsonify({'data' : ret}) if name=="main": app.run()