import json
cred = {
'GOOGLE_KEY': 'secret',
'FACEBOOK_KEY': 'secret'
}
with open('credentials.txt', 'a') as json_file:
json.dump(cred, json_file)
with open('credentials.txt') as f:
data = json.load(f)
FACEBOOK_KEY = data['FACEBOOK_KEY']