Config Classes per Environment
Define Dev, Test, and Prod settings.
One App, Many Worlds
Your app runs in different environments: your laptop, a test runner, and a live server. Each one needs its own settings.
What a Config Class Is
A config class is just a Python class whose attributes become Flask settings. Group related options together and read them in once.
class Config:
DEBUG = False
TESTING = FalseAll lessons in this course
- Config Classes per Environment
- Load Secrets from Environment Variables
- Use dotenv in Development
- Toggle Debug and Feature Flags