1👍
✅
Answering your question. You have to export environment variable first.
$ export secret_key=wioj23423jij2
And in your code you can get the secret key using
import os
secret_key = os.environ.get('secret_key')
Source:stackexchange.com