MCPcopy Create free account
hub / github.com/cocoindex-io/cocoindex-code / save_user_settings

Function save_user_settings

src/cocoindex_code/settings.py:512–518  ·  view source on GitHub ↗

Write user settings YAML. Returns path written.

(settings: UserSettings)

Source from the content-addressed store, hash-verified

510
511
512def save_user_settings(settings: UserSettings) -> Path:
513 """Write user settings YAML. Returns path written."""
514 path = user_settings_path()
515 path.parent.mkdir(parents=True, exist_ok=True)
516 with open(path, "w") as f:
517 _yaml.safe_dump(_user_settings_to_dict(settings), f, default_flow_style=False)
518 return path
519
520
521_INITIAL_HEADER = (

Calls 2

user_settings_pathFunction · 0.85
_user_settings_to_dictFunction · 0.85