Delivery for Flasks
Flask delivery is the work of moving an app from the development server to a production host. It involves running behind a WSGI server such as Gunicorn, putting Nginx or a platform proxy in front, supplying secrets through environment variables, turning debug off and optionally packaging the app in a Docker image.
Stage: Production · Part of the Flask roadmap · Last reviewed 19 November 2026
What to learn in Delivery
- Explain why flask run is not suitable for production traffic
- Serve the app with Gunicorn using a WSGI entry point
- Keep secrets and database URLs in environment variables
- Turn off debug mode and configure logging for production
- Write a simple Dockerfile that runs the app with Gunicorn
Delivery interview questions
Why shouldn't you use the Flask development server in production?
The built-in server is meant for local work. It handles little concurrency, lacks hardening and its debugger can expose code execution if left on. A WSGI server such as Gunicorn runs multiple worker processes and is built to manage real traffic safely.
What does WSGI do for a Flask app?
WSGI is the standard Python interface between a web server and an application. The Flask app is a WSGI callable, so servers like Gunicorn or uWSGI can import it, pass each incoming request to it and return the response, without Flask handling sockets itself.
Where Delivery fits in the Flask roadmap
Delivery belongs to the Production stage (intermediate level). Deploy.
Back to the full Flask roadmap