23 lines
390 B
Python
23 lines
390 B
Python
import json
|
|
|
|
|
|
# Config = {
|
|
# api_token: "xxxxxxxx"
|
|
# }
|
|
Config = {}
|
|
|
|
|
|
def config_load():
|
|
global Config
|
|
try:
|
|
file = open('config.json', 'r')
|
|
Config = json.load(file)
|
|
file.close()
|
|
except IOError:
|
|
Config = {'api_token': ''}
|
|
|
|
|
|
def config_save():
|
|
global Config
|
|
with open('config.json', 'w') as file:
|
|
json.dump(Config, file, indent=4)
|