lamindb.core.IsVersioned#

class lamindb.core.IsVersioned#

Bases: object

Base class for versioned models.

Attributes

stem_uid str#
versions QuerySet#

Lists all records of the same version family.

Examples

>>> new_artifact = ln.Artifact(df2, is_new_version_of=artifact)
>>> new_artifact.save()
>>> new_artifact.versions()

Methods

add_to_version_family(is_new_version_of, version=None)#

Add current record to a version family.

Parameters:
  • is_new_version_of (IsVersioned) – a record that belongs to the version family.

  • version (Optional[str], default: None) – semantic version of the record.