#TIL : Exporting environment variables on virtual env activate


30 Apr 2018 / by KhanhIceTea

You can put common environment variables to the file venv/bin/activate. So everytime we active the virtual env, everything is on the way

# venv/bin/active content

# export your env vars here
export FLASK_APP=hello
export FLASK_ENV=development
export DATABASE=hello.sqlite3
export SECRET_KEY=secret_key_here

Sound good ?