I've read a few how-tos but still struggling with this. In my app I was previously just pulling in my secret keys from a .py file that was in my folder system (which is not best practice). Instead I'd like to use the os module to get my secret keys in my dev environment (and do the same in heroku eventually), similar to the code below:
import os
OAUTH_TOKEN = os.getenv('OAUTH_TOKEN')
I've read that I need to add my actual OAUTH_TOKEN to the .profile file for this to work.
OAUTH_TOKEN = 'mysecretkey'
However, when I got to run the first snippet of code above and attempt to print the OAUTH_TOKEN variable I get nothing in return. I also added my key to the .bashsrc file as well as some other websites said to do this.
What is going on and why can't I retrieve my secret key this way? What am I missing?
export VARNAME="my value".