lamindb_setup.dev.StorageSettings#

class lamindb_setup.dev.StorageSettings(root, region=None, uid=None, uuid=None)#

Bases: object

Manage cloud or local storage settings.

Attributes

cache_dir property#

Cache root, a local directory to cache cloud files.

id property#

Storage id.

is_cloud property#

True if storage_root is in cloud, False otherwise.

record property#

Storage record.

region property#

Storage region.

root property#

Root storage location.

root_as_str property#

Formatted root string.

type property#

AWS S3 vs. Google Cloud vs. local vs. the other protocols.

Returns the protocol.

uid property#

Storage id.

uuid property#

Storage uuid.

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