lit_ollama.store
source package lit_ollama.store
Local on-disk storage primitives.
This package groups together the local filesystem stores used by the API
BlobStore: content-addressed blob storage for the/api/blobsendpoints.ModelStore: checkpoint discovery + simple filesystem operations.LocalStore: a small façade that composes both.
Classes
-
LocalStore — Local filesystem-backed storage used by the API.
source class BlobStore(root: str | Path = 'blobs')
source method BlobStore.exists(digest: str) → bool
source method BlobStore.save(digest: str, content: bytes) → Path
Raises
-
ValueError
source method BlobStore.get_path(digest: str) → Path | None
source class LocalStore(*, blobs_root: str | Path = 'blobs')
Local filesystem-backed storage used by the API.
This is intentionally a thin façade that composes the independent blob/model stores so the API only has to wire up a single dependency.
Methods
source property LocalStore.models: dict[str, TagModel]
source property LocalStore.blobs: BlobStore
source method LocalStore.load_models() → None
source method LocalStore.get_file_hash(file_path: Path) → str
source method LocalStore.get_folder_hash(folder_path: Path) → str
source method LocalStore.get_model(model_name: str) → dict
source method LocalStore.copy_model(model_name: str, new_model_name: str) → None
source method LocalStore.delete_model(model_name: str) → None
source method LocalStore.pull_model(model_name: str) → None
source class ModelStore()
Methods
source method ModelStore.get_file_hash(file_path: Path) → str
source method ModelStore.get_folder_hash(folder_path: Path) → str
source method ModelStore.load_models() → None
source method ModelStore.get_model(model_name: str) → dict[str, Any]
source method ModelStore.copy_model(model_name: str, new_model_name: str) → None
source method ModelStore.delete_model(model_name: str) → None
source method ModelStore.copy_folder(src: Path, dst: Path) → None
Raises
-
ValueError
source method ModelStore.pull_model(model_name: str) → None