import json # The parsed config object __CONFIG = {} def load(filename: str) -> None: ''' Load a JSON-formatted configuration file. @param filename The config file to load. ''' global __CONFIG # Open and parse the JSON config file with open(filename, 'r') as conf: __CONFIG = json.load(conf) def get() -> dict: ''' Return the current configuration. ''' global __CONFIG return __CONFIG