import tomllib with open("config.toml", "rb") as f: config = tomllib.load(f) def reload(): global config with open("config.toml", "rb") as f: config = tomllib.load(f)