Skip to main content

Module atomic_write

Module atomic_write 

Source
Expand description

Atomic file writes via tempfile + rename.

Mirrors the Python pattern of os.replace(tmp, target) to ensure readers never see a partially-written file.

Functionsยง

atomic_write
Atomically write data to path.
atomic_write_json
Atomically write a serde-serializable value as pretty-printed JSON.