Local#

class vortex.store.LocalStore(prefix: str | Path | None = None, *, automatic_cleanup: bool = False, mkdir: bool = False)#

An ObjectStore interface to local filesystem storage.

Create a local store with an optional directory prefix:

from pathlib import Path

store = LocalStore()
store = LocalStore(prefix="/path/to/directory")
store = LocalStore(prefix=Path("."))
classmethod from_url(url: str, *, automatic_cleanup: bool = False, mkdir: bool = False) Self#

Construct a new LocalStore from a file:// URL.

Examples:

Construct a new store pointing to the root of your filesystem:

url = "file:///"
store = LocalStore.from_url(url)

Construct a new store with a directory prefix:

url = "file:///Users/kyle/"
store = LocalStore.from_url(url)
property prefix: Path | None#

Get the prefix applied to all operations in this store, if any.