How to Use Environment Variables in Python .venv in Vscode

Planted . Last tended .
  1. Create a .env file in the workspace root (same place where .vscode file is)
  2. Press Ctrl+Shif+P > Open user settings json
  3. Add the following settings
"python.envFile": "${workspaceFolder}/.env",
"python.terminal.useEnvFile": true
Updated . Thoughts? Email me.