SDK Labs#

The labs module of the DESTINY Repository SDK provides experimental features and interfaces for interacting with the DESTINY data repository.

Anything in this module should be considered experimental and may change or be deprecated in the future.

There may be additional dependencies required to use some features of this module. These can be installed by specifying the labs extra when installing the SDK:

pip install destiny-sdk[labs]

uv add destiny-sdk --extra labs

References#

class libs.sdk.src.destiny_sdk.labs.references.LabsReference(*, reference: Reference)[source]#

Experimental presenter class for Reference with added convenience methods.

property abstract: str | None[source]#

Return an abstract for the reference.

property doi: str | None[source]#

Return a DOI for the reference.

has_bool_annotation(source: str | None = None, scheme: str | None = None, label: str | None = None, expected_value: bool = True) bool | None[source]#

Check if a specific annotation exists and is true.

Parameters:
  • source – Optional filter for Enhancement.source

  • scheme – Optional filter for Annotation.scheme

  • label – Optional filter for Annotation.label

  • expected_value – Specify expected boolean annotation value

Returns:

Returns the boolean value for the first annotation matching the filters or None if nothing is found.

it_annotations(source: str | None = None, annotation_type: AnnotationType | None = None, scheme: str | None = None, label: str | None = None) Generator[Annotated[BooleanAnnotation | ScoreAnnotation, FieldInfo(annotation=NoneType, required=True, discriminator='annotation_type')], None, None][source]#

Iterate annotation enhancements for the given filters.

Parameters:
  • source – Optional filter for Enhancement.source

  • annotation_type – Optional filter for AnnotationEnhancement.annotation_type

  • scheme – Optional filter for Annotation.scheme

  • label – Optional filter for Annotation.label

it_bibliographics() Generator[BibliographicMetadataEnhancement, None, None][source]#

Iterate bibliographic enhancements.

model_config: ClassVar[ConfigDict] = {}[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property openalex_id: str | None[source]#

Return an OpenAlex ID for the reference.

property publication_year: int | None[source]#

Return a publication year for the reference.

property pubmed_id: int | None[source]#

Return a pubmed ID for the reference.

property title: str | None[source]#

The title of the reference. If multiple are present, return first one.