@app.route('/dothis', methods = ['POST']) def do_this(): ... return {"data": return_data} # data returned to website