## lamindb.DB

class lamindb.DB(instance)

 Bases: "object"

 Query any registry of any instance.

 Parameters:
 **instance** ("str") -- Instance identifier in format
 "account/instance".

 -[ Examples ]-

 Query objects from an instance:

 db = ln.DB("laminlabs/cellxgene")

 Query artifacts and filter by "suffix":

 db.Artifact.filter(suffix=".h5ad").to_dataframe()

 Get a single artifact by uid:

 artifact = db.Artifact.get("abcDEF123456")

 Query records and filter by name:

 db.Record.filter(name__startswith="sample").to_dataframe()

 Get a cell type object:

 t_cell = db.bionty.CellType.get(name="T cell")

 Create a lookup object to auto-complete all cell types in the
 database:

 cell_types = db.bionty.CellType.lookup()

 Return a "DataFrame" with additional info:

 db.Artifact.filter(
 suffix=".h5ad",
 description__contains="immune",
 size__gt=1e9,  # size > 1GB
 cell_types__name__in=["B cell", "T cell"],
 ).order_by("created_at").to_dataframe(
 include=["cell_types__name", "created_by__handle"]  # include additional info
 ).head()

# Attributes

 Artifact: QuerySet[Artifact]

 Query artifacts.

 Collection: QuerySet[Collection]

 Query collections.

 Transform: QuerySet[Transform]

 Query transforms.

 Run: QuerySet[Run]

 Query runs.

 User: QuerySet[User]

 Query users.

 Storage: QuerySet[Storage]

 Query storages.

 Feature: QuerySet[Feature]

 Query features.

 ULabel: QuerySet[ULabel]

 Query ulabels.

 Record: QuerySet[Record]

 Query records.

 Schema: QuerySet[Schema]

 Query schemas.

 Project: QuerySet[Project]

 Query projects.

 Reference: QuerySet[Reference]

 Query references.

 Branch: QuerySet[Branch]

 Query branches.

 Space: QuerySet[Space]

 Query spaces.

 bionty: BiontyDB

 Namespace for Bionty registries (Gene, CellType, Disease, etc.).

 pertdb: PertdbDB

 Namespace for "PertDB" registries (Biologic, Compound, etc.).