How Flask load file env

Install pacakge python-dotenv

pip install python-dotenv

How use in Flask

# .env
MY_SECRET="helloworld"
# config.py
from dotenv import load_dotenv
load_dotenv()
# app.py
import os
SECRET_KEY = os.getenv("MY_SECRET")