set os environment variable linux using python code example
Example 1: python create environment variable
import os
os.environ['variable_name'] = 'variable_value'
Example 2: how to use information from env variables in python
$ pip install python-decouple
Example 3: how to use information from env variables in python
from decouple import config
API_USERNAME = config('USER')
API_KEY = config('KEY')