MCPcopy
hub / github.com/opentrace/opentrace / save_config

Function save_config

agent/src/opentrace_agent/cli/config.py:61–64  ·  view source on GitHub ↗

Write *data* as YAML to *path*, creating parent directories if needed.

(path: Path, data: dict[str, Any])

Source from the content-addressed store, hash-verified

59
60
61def save_config(path: Path, data: dict[str, Any]) -> None:
62 """Write *data* as YAML to *path*, creating parent directories if needed."""
63 path.parent.mkdir(parents=True, exist_ok=True)
64 path.write_text(yaml.dump(data, default_flow_style=False, sort_keys=False))

Calls 1

dumpMethod · 0.80