MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / load_config

Function load_config

beanhub_cli/config.py:23–33  ·  view source on GitHub ↗
(file_path: pathlib.Path | None = None)

Source from the content-addressed store, hash-verified

21
22
23def load_config(file_path: pathlib.Path | None = None) -> Config | None:
24 import tomli
25
26 if file_path is None:
27 file_path = get_config_path()
28 if not file_path.exists():
29 return
30
31 with file_path.open("rb") as fo:
32 obj = tomli.load(fo)
33 return Config.model_validate(obj)
34
35
36def save_config(config: Config, file_path: pathlib.Path | None = None):

Callers 3

test_loginFunction · 0.90
ensure_auth_configFunction · 0.85
mainFunction · 0.85

Calls 1

get_config_pathFunction · 0.85

Tested by 1

test_loginFunction · 0.72