MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _append_jsonl

Function _append_jsonl

src/mcp_client/client.py:15–20  ·  view source on GitHub ↗
(path: str, event: Dict[str, Any])

Source from the content-addressed store, hash-verified

13
14
15def _append_jsonl(path: str, event: Dict[str, Any]) -> None:
16 p = Path(path)
17 p.parent.mkdir(parents=True, exist_ok=True)
18 line = json.dumps(event, ensure_ascii=False, default=json_default)
19 with p.open("a", encoding="utf-8") as f:
20 f.write(line + "\n")
21
22
23def _read_jsonl(path: str) -> List[Dict[str, Any]]:

Callers 2

invokeMethod · 0.90
invokeMethod · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected