Enables converting a Jupyter Notebook to a Flask API project using Cuttle. The plugin works by converting a code cell into function attached to a Flask route (Check Flask Project Layout).
Required config - route, method, response
#cuttle-environment-set-config <environment> route=<route> method=<http method> response=<response variable>
....
The plugin provides the original request
object provided by Flask (properties). This can be used along with Cuttle line scoped get config.
Example:
file = open("./images/mnist3.png", "rb") #cuttle-environment-assign mnist-api request.files['file']
This results in:
file = request.files['file']