stilt.store.LocalStore#

class stilt.store.LocalStore(root: 'str | Path') → 'None'[source]#

Store backed by a local directory.

publish_file writes to a sibling .tmp file and then renames it onto the final key, so concurrent readers never observe a partial file.

Methods#

exists(key)

Return whether the key has been written.

local_path(key)

Return a local path for the key; the store is already local.

path(key)

Return the absolute local path for key.

publish_file(local_path, key)

Copy a finished local file into the store; a missing source is ignored.

read_bytes(key)

Read the key's bytes.

write_bytes(key, data)

Write bytes to the key, creating parent directories.