I have this config.py file which is used to store environmental variables
PUSH_API_ACCOUNT_ID = '*******'
PUSH_API_PASSCODE = '***********************'
I am using this to fetch the variables and use it  in my file.py 
import sys
 
sys.path.append("..")
 
from folder import config
 
 
 
# create header for  push API
headers = {
    'Account-Id': PUSH_API_ACCOUNT_ID,
    'Passcode': PUSH_API_PASSCODE,
    'Content-Type': 'application/json',
    }
#Push API url
url = "https://fetch.api.netscape.news.com/1/send/push.json"
#call  API
response = requests.request("POST", url, headers=headers, data = data)
How to do it in Repos and Workspace section