fleche.storage.file
Attributes
Classes
File-based storage backend using pickle. |
Functions
|
Context manager for acquiring a write lock on a file. |
|
Context manager for acquiring a read lock on a file. |
Module Contents
- fleche.storage.file.file_write_lock(lock_path: pathlib.Path) Generator[None, None, None][source]
Context manager for acquiring a write lock on a file.
Creates a lock file with hostname, PID, and timestamp.
- fleche.storage.file.file_read_lock(lock_path: pathlib.Path, timeout: float, wait_start: float, key: str) Generator[None, None, None][source]
Context manager for acquiring a read lock on a file.
Waits for a lock file to be removed with exponential backoff.
- class fleche.storage.file.FileStorage[source]
Bases:
fleche.storage.base.StorageFile-based storage backend using pickle.
Stores objects on the filesystem.
- list() Iterable[fleche.digest.Digest][source]
- _evict(key: fleche.digest.Digest) None[source]
- save(value: Any, key: fleche.digest.Digest | None = None) fleche.digest.Digest[source]
- load(key: fleche.digest.Digest | str) Any[source]
- _contains(key: fleche.digest.Digest) bool[source]