from flask import send_file
from flask import Flask
from random import randint
app = Flask(__name__)
@app.route('/')
def cook():
filename = 'flask.png'
resp = send_file(filename, mimetype='image/png')
resp.set_cookie('username', str(randint(5,100)))
return resp
if __name__ == '__main__':
app.run(debug=True)