I currently have a python server using flask tht allows me to send data from postman to it. It works perfectly and the output shows up in the terminal for the flask/python app. However, I would like the output to be sent back to postman so the "frontend" can use it. How can I do this?
Code:
from flask import Flask, request
from flask_restful import Resource, Api
from server import analyzeWeaknesses, printOutput
app = Flask(__name__)
api = Api(app)
@app.route('/analyzeTrucks', methods=['POST'])
def TruckAnalysis():
if request.method == 'POST':
analyzeTrucks(request.data)
return {"status":"success"}
if __name__ == '__main__':
app.run()