bionty.core.BioRecord .md

class bionty.core.BioRecord(*args, **kwargs)

Bases: SQLRecord, HasSource, CanCurate

Base SQLRecord of bionty.

BioRecord inherits all methods from SQLRecord and CanCurate().

Notes

For more info, see tutorials:

uid: str

A universal id (base62-encoded hash of defining fields).

abbr: str | None

A unique abbreviation, maximum length 32 characters.

synonyms: str | None

Bar-separated (|) synonyms of this biorecord.

description: str | None

Description of the biorecord.

classmethod require_organism(field=None)

Check if the registry has an organism field and is required.

Return type:

bool

Returns:

True if the registry has an organism field and is required, False otherwise.

save(*args, **kwargs)

Save the record and its parents recursively.

Example:

import bionty as bt

record = bt.CellType.from_source(name="T cell")
record.save()
Return type:

BioRecord