NameError: name 'request' is not defined
You appear to have forgotten to import the flask.request
request context object:
from flask import request
You are probably missing the following import
statement:
from flask import request
that should be placed in the header of the file.
This is because you missed the import statement
from flask import request