Posts tagged with flask


直接返回文件 导入make_response,send_file response = make_response(send_file(filename)) response.headers["Content-Disposition"] = "attachment;filename="+filename+";" return response…

使用gunicorn将flask应用部署到生产环境 应用容器 main.py from flask import Flask app = Flask(__name__) @app.route('/') def index(): return "Hello World!" 安装 gunicorn [Gunicorn](Gunicorn - Python WSGI HTTP Server for UNIX) (venv) pip…