Skip to content

Instantly share code, notes, and snippets.

@jerblack
jerblack / Prevent_flask_production_environment_warning.py
Last active May 11, 2023 05:35
Disable ability for Flask to display warning about using a development server in a production environment.
"""
Flask will display a warning everytime you startup your application if you are not using it in behind a separate WSGI server.
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
This was not relevant for my scenario and I wanted the message gone,
so using this method will remove their ability to print that message