I have a flask app and I need to pass variables from one function to another. The requirement here is I need to pass the value of 'skill' from index() to get_image(), any idea on how this can be achieved?
@app.route('/', methods=['POST'])
def index():
    data = json.loads(request.get_data())
    skill = data['conversation']['skill']
@app.route("/get-image/<image_name>")
def get_image(image_name):
    if skill == 'getpositions':
        # some code
 
     
    