My expected output is:

My source code to return JSON:
def return_fun(status,code,content):
return jsonify({"Status":status,"Response":code,"data":content})
How do I automatically fetch the status code and return it, so I get output like first image?