stilt.store.LocalStore#

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

Store backed by a local directory.

publish_file copies to a temporary file and renames it into place, so a reader never sees a partly written file.

Parameters

rootstr or Path

Directory that keys are relative to.

Methods#

delete(key)

Remove the file for key if it exists.

exists(key)

Return whether key exists.

local_path(key)

Return the absolute local path of key.

publish_file(local_path, key)

Copy a local file into the store under key.

read_bytes(key)

Return the bytes stored under key.

write_bytes(key, data)

Write data under key, creating parent directories.