How do I (safely) send a Python object to my Flask API?
问题 I am currently trying to build a Flask Web API that is able to receive a python object in a POST-request. I am using Python 3.7.1 for creating the request and Python 2.7 for running the API. The API is set up to run on my local machine. The object I am trying to send to my API is a RandomForestClassifier object from sklearn.ensemble , but this could be any of a wide variety of object types. So far I have tried to json.dumps() my object, but this object is not JSON serializable. I have also