0PricingLogin
Flask Academy · Lesson

Use dotenv in Development

Load a .env file for local config.

Exporting by Hand Gets Old

Typing export for ten variables every session is tedious and easy to forget. A .env file fixes that for local work.

What a .env File Holds

A .env file is plain text with KEY=value lines. It lives at your project root and feeds variables in automatically.

SECRET_KEY=dev-secret
DEBUG=1

All lessons in this course

  1. Config Classes per Environment
  2. Load Secrets from Environment Variables
  3. Use dotenv in Development
  4. Toggle Debug and Feature Flags
← Back to Flask Academy