## lamindb.Reference

| class lamindb.Reference(name: str, type: Reference | None | Unset = UNSET, is_type: bool = False, abbr: str | None = None, url: str | None = None, pubmed_id: int | None = None, doi: str | None = None, description: str | None = None, text: str | None = None, date: DateType | None = None, branch: Branch | None = None, space: Space | None = None) |
class lamindb.Reference(*db_args)

 Bases: "SQLRecord", "HasType", "CanCurate", "HasAbbr", "TracksRun",
 "TracksUpdates", "ValidateFields"

 References such as internal studies, papers, documents, or URLs.

 Parameters:
 * **name** -- "str" The name of the reference.

| * **type** -- "Reference | None = None" The type of the |
 reference.

 * **is_type** -- "bool = False" Whether this is a reference
 type.

| * **abbr** -- "str | None = None" The abbreviation of the |
 reference.

| * **url** -- "str | None = None" The URL of the reference. |

| * **pubmed_id** -- "int | None = None" The PubMed ID of the |
 reference.

| * **doi** -- "str | None = None" The DOI of the reference. |

| * **description** -- "str | None = None" The description of the |
 reference.

| * **text** -- "str | None = None" The text of the reference. |

| * **date** -- "DateType | None = None" The date of the |
 reference.

| * **branch** -- "Branch | None = None" A branch. If "None", uses |
 the current branch.

| * **space** -- "Space | None = None" A space. If "None", uses |
 the current space.

# Examples

 Create a reference:

 reference = Reference(
 name="A Paper Title",
 abbr="APT",
 url="https://doi.org/10.1000/xyz123",
 pubmed_id=12345678,
 doi="10.1000/xyz123",
 description="Good paper.",
 text="Some text I want to be searchable.",
 date=date(2023, 11, 21),
 ).save()

 uid: str

 Universal id, valid across DB instances.

 name: str

 Title or name of the reference document.

| description: str | None |

 A description.

| abbr: str | None |

 An abbreviation for the reference.

| url: str | None |

 URL linking to the reference.

| pubmed_id: int | None |

 A PudMmed ID.

| doi: str | None |

 Digital Object Identifier (DOI) for the reference.

| text: str | None |

 Abstract or full text of the reference to make it searchable.

| date: DateType | None |

 Date of creation or publication of the reference.

| type: Reference | None |

 Type of reference (e.g., 'Study', 'Paper', 'Preprint') ←
 "references".

 Allows to group reference by type, e.g., internal studies vs.
 all papers etc.

 artifacts: RelatedManager[Artifact]

 Annotated artifacts ← "references".

 transforms: RelatedManager[Transform]

 Annotated transforms ← "references".

 collections: RelatedManager[Collection]

 Annotated collections ← "references".

 linked_in_records: RelatedManager[Record]

 Linked in records ← "linked_references".

 records: RelatedManager[Record]

 Annotated records ← "references".

 references: RelatedManager[Reference]

 References of this type (can only be non-empty if "is_type" is
 "True").

 projects: RelatedManager[Project]

 Projects that annotate this reference ← "references".

 query_references(depth=None)

 Query references of sub types.

 While ".references" retrieves the references with the current
 type, this method also retrieves sub types and the references
 with sub types of the current type.

 Parameters:
| **depth** ("int" | "None", default: "None") -- How many type |
 hops to follow. "None" walks the whole subtree. "1" returns
 only the direct references of this type.

 Return type:
 "QuerySet"