Spaces:
Runtime error
Runtime error
File size: 331 Bytes
2112adc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import json
def load_config():
return json.load(open('config.json', encoding='utf-8'))
def write_tokens(auth_token, refresh_token):
cfg = load_config()
cfg['auth_token'] = auth_token
cfg['refresh_token'] = refresh_token
with open('config.json', 'w', encoding='utf-8') as w:
w.write(json.dumps(cfg))
|