lamindb.setup.core.StorageSettings#

class lamindb.setup.core.StorageSettings(root, region=None, uid=None, uuid=None, access_token=None)#

Bases: object

Manage cloud or local storage settings.

Attributes

cache_dir UPath#

Cache root, a local directory to cache cloud files.

id int#

Storage id.

record Any#

Storage record.

region Optional#

Storage region.

root UPath#

Root storage location.

root_as_str str#

Formatted root string.

type Literal#

AWS S3 vs. Google Cloud vs. local.

Returns the protocol as a string: “local”, “s3”, “gs”.

type_is_cloud bool#

True if storage_root is in cloud, False otherwise.

uid Optional#

Storage id.

Methods

cloud_to_local(filepath, **kwargs)#

Local (cache) filepath from filepath.

Return type:

UPath

cloud_to_local_no_update(filepath)#
Return type:

UPath

key_to_filepath(filekey)#

Cloud or local filepath from filekey.

Return type:

UPath

local_filepath(filekey)#

Local (cache) filepath from filekey: local(filepath(…)).

Return type:

UPath