lamindb.Storage#
- class lamindb.Storage(root: str, type: str, region: str | None)#
Bases:
Registry
Storage locations.
A storage location can be a local or remote directory/folder or an entire S3/GCP bucket.
This registry is auto-managed and read-only.
See also
Default storage:
storage
Examples
Configure the default storage location upon initiation of a LaminDB instance:
lamin init --storage ./mydata # or "s3://my-bucket" or "gs://my-bucket"
View the default storage location:
>>> ln.settings.storage PosixPath('/home/runner/work/lamindb/lamindb/docs/guide/mydata')
Dynamically change the default storage:
>>> ln.settings.storage = "./storage_2" # or a cloud bucket
Fields
- id AutoField
Internal id, valid only in one DB instance.
- uid CharField
Universal id, valid across DB instances.
- root CharField
Root path of storage, an s3 path, a local path, etc. (required).
- description CharField
A description of what the storage location is used for (optional).
- type CharField
Local vs. s3 vs. gcp etc.
- region CharField
Cloud storage region, if applicable.
- created_at DateTimeField
Time of creation of record.
- updated_at DateTimeField
Time of last update to record.
- created_by ForeignKey
Creator of record, a
User
.
Methods