2022-06-11 18:08:24 +01:00
|
|
|
from main import Config
|
2022-06-11 11:33:06 +01:00
|
|
|
from ..data import data as data_dir
|
2022-06-11 11:29:15 +01:00
|
|
|
import json
|
|
|
|
|
|
|
|
def load(filename:str):
|
|
|
|
with open(f'./{data_dir}/{filename}') as file:
|
|
|
|
return json.load(file)
|
|
|
|
|
|
|
|
def save(data:dict, filename:str):
|
|
|
|
with open(f'./{data_dir}/{filename}', 'w') as file:
|
|
|
|
json.dump(data, file, indent=4)
|