MCPcopy
hub / github.com/marimo-team/marimo / write_session_snapshot

Function write_session_snapshot

marimo/_server/export/_session_cache.py:65–73  ·  view source on GitHub ↗
(
    *,
    notebook_path: str | Path,
    snapshot: NotebookSessionV1,
)

Source from the content-addressed store, hash-verified

63
64
65def write_session_snapshot(
66 *,
67 notebook_path: str | Path,
68 snapshot: NotebookSessionV1,
69) -> Path:
70 output = get_session_cache_file(Path(notebook_path))
71 maybe_make_dirs(output)
72 output.write_text(json.dumps(snapshot, indent=2), encoding="utf-8")
73 return output
74
75
76def persist_session_view_to_cache(

Callers 2

Calls 3

get_session_cache_fileFunction · 0.90
maybe_make_dirsFunction · 0.90
write_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…