11 lines
		
	
	
		
			300 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			300 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from .. import Config
 | 
						|
from ..data import data_dir
 | 
						|
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) |