lamindb.dev.LabelManager#

class lamindb.dev.LabelManager(host)#

Bases: object

Label manager (labels).

See Data for more information.

Attributes

Methods

add(records, feature)#

Add one or several labels and associate them with a feature.

Parameters:
  • records (Union[Registry, List[Registry], QuerySet]) – Label records to add.

  • feature (Feature) – Feature under which to group the labels.

  • field – Field to parse iterable with from_values.

Return type:

None

get(feature, mute=False, flat_names=False)#

Get labels given a feature.

Parameters:
  • feature (Feature) – Feature under which labels are grouped.

  • mute (bool, default: False) – Show no logging.

  • flat_names (bool, default: False) – Flatten list to names rather than returning records.

Return type:

Union[QuerySet, Dict[str, QuerySet], List]