I am trying to develop an api with Flask. I want my api to return json file. However, the value I return is a tuple because it contains the json file and the status code. Do I need to show the Status Code in a different way? Thank you for your help.
def create(name, age):
return {"name": name,"age": age},{"Status Code": 200}
@app.route("/createaccount/", methods=["POST"])
def CreateAcc():
account_info = json.loads(request.data)
data_set = create(name="Jack", age=23)
json_dump = json.dumps(data_set)
return json_dump