lamindb.Storage#
- class lamindb.Storage(root: str, type: str, region: Optional[str])#
Bases:
Registry
Storage locations.
Is auto-managed, no need to create records.
Can be local or remote directories or entire S3/GCP buckets.
See also
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).
- 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