How do I create an environement variable to save my secret information inside a virtual enviroenment. I am using venv module in the standard library. Can anyone give me the steps? I tried editing the bash_profile file and adding a variable, but it is not accessible inside a venv!
Asked
Active
Viewed 119 times
1 Answers
1
$HOME/.bash_profile is not sourced into the activate script of the venv. You have to add your export SECRETVAR="secretvalue" to the end of the activate script instead.
TheEagle
- 5,808
- 3
- 11
- 39