SDK Models#
This documentation auto-generates details about the Pydantic models used in the SDK.
For the most part, these models are used to define the API interface.
Imports#
Import process classes for the Destiny SDK.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchIn[source]#
Input for creating an import batch.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportBatchIn" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchIn</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchIn

Input for creating an import batch.
"];
}](../_images/graphviz-8928d7d0c5dcdd135049483fc18ba8456bc4f33d.png)
Show JSON schema
{ "title": "ImportBatchIn", "description": "Input for creating an import batch.", "type": "object", "properties": { "storage_url": { "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n ", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Storage Url", "type": "string" } }, "required": [ "storage_url" ] }
- field storage_url: HttpUrl [Required][source]#
The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to
ReferenceFileInput.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchRead[source]#
Core import batch class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead

Core import batch class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead

Core import record class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead

Core import result class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-efd5c927019bc489d6ed4d2746fe4a0f67f6b551.png)
Show JSON schema
{ "$defs": { "ImportBatchRead": { "description": "Core import batch class.", "properties": { "storage_url": { "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n ", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Storage Url", "type": "string" }, "id": { "description": "The ID of the import batch", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportBatchStatus", "default": "created", "description": "The status of the batch." }, "import_record_id": { "description": "The ID of the import record this batch is associated with", "format": "uuid4", "title": "Import Record Id", "type": "string" }, "import_record": { "anyOf": [ { "$ref": "#/$defs/ImportRecordRead" }, { "type": "null" } ], "default": null, "description": "The parent import record." }, "import_results": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportResultRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The results from processing the batch.", "title": "Import Results" } }, "required": [ "storage_url", "id", "import_record_id" ], "title": "ImportBatchRead", "type": "object" }, "ImportBatchStatus": { "description": "Describes the status of an import batch.", "enum": [ "created", "started", "failed", "partially_failed", "completed" ], "title": "ImportBatchStatus", "type": "string" }, "ImportRecordRead": { "description": "Core import record class.", "properties": { "search_string": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The search string used to produce this import", "title": "Search String" }, "searched_at": { "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n ", "format": "date-time", "title": "Searched At", "type": "string" }, "processor_name": { "description": "The name of the processor that is importing the data.", "title": "Processor Name", "type": "string" }, "processor_version": { "description": "The version of the processor that is importing the data.", "title": "Processor Version", "type": "string" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n ", "title": "Notes" }, "expected_reference_count": { "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n", "minimum": -1, "title": "Expected Reference Count", "type": "integer" }, "source_name": { "description": "The source of the reference being imported (eg. Open Alex)", "title": "Source Name", "type": "string" }, "id": { "description": "The ID of the import record", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportRecordStatus", "default": "created", "description": "The status of the import record" }, "batches": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportBatchRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of batches for the import record", "title": "Batches" } }, "required": [ "processor_name", "processor_version", "expected_reference_count", "source_name", "id" ], "title": "ImportRecordRead", "type": "object" }, "ImportRecordStatus": { "description": "Describes the status of an import record.", "enum": [ "created", "started", "completed" ], "title": "ImportRecordStatus", "type": "string" }, "ImportResultRead": { "description": "Core import result class.", "properties": { "id": { "description": "The ID of the import result.", "format": "uuid4", "title": "Id", "type": "string" }, "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the reference created by this import result.", "title": "Reference Id" }, "failure_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The details of the failure, if the import result failed.", "title": "Failure Details" }, "import_batch": { "anyOf": [ { "$ref": "#/$defs/ImportBatchRead" }, { "type": "null" } ], "default": null, "description": "The parent import batch." } }, "required": [ "id" ], "title": "ImportResultRead", "type": "object" } }, "$ref": "#/$defs/ImportBatchRead" }
- Fields:
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the import batch
- Constraints:
uuid_version = 4
- field import_record: ImportRecordRead | None = None[source]#
The parent import record.
- field import_record_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the import record this batch is associated with
- Constraints:
uuid_version = 4
- field import_results: list[ImportResultRead] | None = None[source]#
The results from processing the batch.
- field status: ImportBatchStatus = ImportBatchStatus.CREATED[source]#
The status of the batch.
- field storage_url: HttpUrl [Required][source]#
The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to
ReferenceFileInput.
- class libs.sdk.src.destiny_sdk.imports.ImportBatchStatus(*values)[source]#
Describes the status of an import batch.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportBatchSummary[source]#
A view for an import batch that includes a summary of its results.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportBatchSummary" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchSummary</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>import_batch_id</td><td port="import_batch_id">UUID</td></tr><tr><td>import_batch_status</td><td port="import_batch_status">ImportBatchStatus</td></tr><tr><td>results</td><td port="results">dict[ImportResultStatus, int]</td></tr><tr><td>failure_details</td><td port="failure_details">list[str] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchSummary

A view for an import batch that includes a summary of its results.&#\
xA;"];
}](../_images/graphviz-e52d5de23a6c499d3d5e4dc767cd4c0556695324.png)
Show JSON schema
{ "title": "ImportBatchSummary", "description": "A view for an import batch that includes a summary of its results.", "type": "object", "properties": { "storage_url": { "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n ", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Storage Url", "type": "string" }, "id": { "description": "\nThe identifier of the batch.\n", "format": "uuid4", "title": "Id", "type": "string" }, "import_batch_id": { "description": "The ID of the batch being summarised", "format": "uuid4", "title": "Import Batch Id", "type": "string" }, "import_batch_status": { "$ref": "#/$defs/ImportBatchStatus", "description": "The status of the batch being summarised" }, "results": { "additionalProperties": { "type": "integer" }, "description": "A count of references by their current import status.", "propertyNames": { "$ref": "#/$defs/ImportResultStatus" }, "title": "Results", "type": "object" }, "failure_details": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "\n The details of the failures that occurred.\n Each failure will start with `\"Entry x\"` where x is the line number of the\n jsonl object attempted to be imported.\n ", "title": "Failure Details" } }, "$defs": { "ImportBatchStatus": { "description": "Describes the status of an import batch.", "enum": [ "created", "started", "failed", "partially_failed", "completed" ], "title": "ImportBatchStatus", "type": "string" }, "ImportResultStatus": { "description": "Describes the status of an import result.", "enum": [ "created", "started", "completed", "partially_failed", "failed", "retrying" ], "title": "ImportResultStatus", "type": "string" } }, "required": [ "storage_url", "id", "import_batch_id", "import_batch_status", "results", "failure_details" ] }
- Fields:
- field failure_details: list[str] | None [Required][source]#
The details of the failures that occurred. Each failure will start with “Entry x” where x is the line number of the jsonl object attempted to be imported.
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The identifier of the batch.
- Constraints:
uuid_version = 4
- field import_batch_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the batch being summarised
- Constraints:
uuid_version = 4
- field import_batch_status: ImportBatchStatus [Required][source]#
The status of the batch being summarised
- field results: dict[ImportResultStatus, int] [Required][source]#
A count of references by their current import status.
- field storage_url: HttpUrl [Required][source]#
The URL at which the set of references for this batch are stored. The file is a jsonl with each line formatted according to
ReferenceFileInput.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportRecordIn[source]#
Input for creating an import record.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportRecordIn" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordIn</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordIn

Input for creating an import record.
"];
}](../_images/graphviz-fb218d4975eb44be8ce1a1d19d70f48b29d6911b.png)
Show JSON schema
{ "title": "ImportRecordIn", "description": "Input for creating an import record.", "type": "object", "properties": { "search_string": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The search string used to produce this import", "title": "Search String" }, "searched_at": { "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n ", "format": "date-time", "title": "Searched At", "type": "string" }, "processor_name": { "description": "The name of the processor that is importing the data.", "title": "Processor Name", "type": "string" }, "processor_version": { "description": "The version of the processor that is importing the data.", "title": "Processor Version", "type": "string" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n ", "title": "Notes" }, "expected_reference_count": { "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n", "minimum": -1, "title": "Expected Reference Count", "type": "integer" }, "source_name": { "description": "The source of the reference being imported (eg. Open Alex)", "title": "Source Name", "type": "string" } }, "required": [ "processor_name", "processor_version", "expected_reference_count", "source_name" ] }
- Fields:
- field expected_reference_count: int [Required][source]#
The number of references expected to be included in this import. -1 is accepted if the number is unknown.
- Constraints:
ge = -1
- field notes: str | None = None[source]#
Any additional notes regarding the import (eg. reason for importing, known issues).
- field processor_version: str [Required][source]#
The version of the processor that is importing the data.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportRecordRead[source]#
Core import record class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead

Core import batch class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead

Core import record class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead

Core import result class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-efd5c927019bc489d6ed4d2746fe4a0f67f6b551.png)
Show JSON schema
{ "$defs": { "ImportBatchRead": { "description": "Core import batch class.", "properties": { "storage_url": { "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n ", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Storage Url", "type": "string" }, "id": { "description": "The ID of the import batch", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportBatchStatus", "default": "created", "description": "The status of the batch." }, "import_record_id": { "description": "The ID of the import record this batch is associated with", "format": "uuid4", "title": "Import Record Id", "type": "string" }, "import_record": { "anyOf": [ { "$ref": "#/$defs/ImportRecordRead" }, { "type": "null" } ], "default": null, "description": "The parent import record." }, "import_results": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportResultRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The results from processing the batch.", "title": "Import Results" } }, "required": [ "storage_url", "id", "import_record_id" ], "title": "ImportBatchRead", "type": "object" }, "ImportBatchStatus": { "description": "Describes the status of an import batch.", "enum": [ "created", "started", "failed", "partially_failed", "completed" ], "title": "ImportBatchStatus", "type": "string" }, "ImportRecordRead": { "description": "Core import record class.", "properties": { "search_string": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The search string used to produce this import", "title": "Search String" }, "searched_at": { "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n ", "format": "date-time", "title": "Searched At", "type": "string" }, "processor_name": { "description": "The name of the processor that is importing the data.", "title": "Processor Name", "type": "string" }, "processor_version": { "description": "The version of the processor that is importing the data.", "title": "Processor Version", "type": "string" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n ", "title": "Notes" }, "expected_reference_count": { "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n", "minimum": -1, "title": "Expected Reference Count", "type": "integer" }, "source_name": { "description": "The source of the reference being imported (eg. Open Alex)", "title": "Source Name", "type": "string" }, "id": { "description": "The ID of the import record", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportRecordStatus", "default": "created", "description": "The status of the import record" }, "batches": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportBatchRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of batches for the import record", "title": "Batches" } }, "required": [ "processor_name", "processor_version", "expected_reference_count", "source_name", "id" ], "title": "ImportRecordRead", "type": "object" }, "ImportRecordStatus": { "description": "Describes the status of an import record.", "enum": [ "created", "started", "completed" ], "title": "ImportRecordStatus", "type": "string" }, "ImportResultRead": { "description": "Core import result class.", "properties": { "id": { "description": "The ID of the import result.", "format": "uuid4", "title": "Id", "type": "string" }, "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the reference created by this import result.", "title": "Reference Id" }, "failure_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The details of the failure, if the import result failed.", "title": "Failure Details" }, "import_batch": { "anyOf": [ { "$ref": "#/$defs/ImportBatchRead" }, { "type": "null" } ], "default": null, "description": "The parent import batch." } }, "required": [ "id" ], "title": "ImportResultRead", "type": "object" } }, "$ref": "#/$defs/ImportRecordRead" }
- Fields:
- field batches: list[ImportBatchRead] | None = None[source]#
A list of batches for the import record
- field expected_reference_count: int [Required][source]#
The number of references expected to be included in this import. -1 is accepted if the number is unknown.
- Constraints:
ge = -1
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the import record
- Constraints:
uuid_version = 4
- field notes: str | None = None[source]#
Any additional notes regarding the import (eg. reason for importing, known issues).
- field processor_version: str [Required][source]#
The version of the processor that is importing the data.
- field searched_at: PastDatetime [Optional][source]#
The timestamp (including timezone) at which the search which produced this import was conducted. If no timezone is included, the timestamp is assumed to be in UTC.
- field source_name: str [Required][source]#
The source of the reference being imported (eg. Open Alex)
- field status: ImportRecordStatus = ImportRecordStatus.CREATED[source]#
The status of the import record
- class libs.sdk.src.destiny_sdk.imports.ImportRecordStatus(*values)[source]#
Describes the status of an import record.
- pydantic model libs.sdk.src.destiny_sdk.imports.ImportResultRead[source]#
Core import result class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportBatchRead</b></td></tr><tr><td>storage_url</td><td port="storage_url">HttpUrl</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportBatchStatus</td></tr><tr><td>import_record_id</td><td port="import_record_id">UUID</td></tr><tr><td>import_record</td><td port="import_record">ImportRecordRead | None</td></tr><tr><td>import_results</td><td port="import_results">list[ImportResultRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportBatchRead

Core import batch class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportRecordRead</b></td></tr><tr><td>search_string</td><td port="search_string">str | None</td></tr><tr><td>searched_at</td><td port="searched_at">PastDatetime</td></tr><tr><td>processor_name</td><td port="processor_name">str</td></tr><tr><td>processor_version</td><td port="processor_version">str</td></tr><tr><td>notes</td><td port="notes">str | None</td></tr><tr><td>expected_reference_count</td><td port="expected_reference_count">int</td></tr><tr><td>source_name</td><td port="source_name">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>status</td><td port="status">ImportRecordStatus</td></tr><tr><td>batches</td><td port="batches">list[ImportBatchRead] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportRecordRead

Core import record class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_record:e -> "libs.sdk.src.destiny_sdk.imports.ImportRecordRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ImportResultRead</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>failure_details</td><td port="failure_details">str | None</td></tr><tr><td>import_batch</td><td port="import_batch">ImportBatchRead | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.imports.ImportResultRead

Core import result class.
"];
"libs.sdk.src.destiny_sdk.imports.ImportBatchRead":import_results:e -> "libs.sdk.src.destiny_sdk.imports.ImportResultRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportRecordRead":batches:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.imports.ImportResultRead":import_batch:e -> "libs.sdk.src.destiny_sdk.imports.ImportBatchRead":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-efd5c927019bc489d6ed4d2746fe4a0f67f6b551.png)
Show JSON schema
{ "$defs": { "ImportBatchRead": { "description": "Core import batch class.", "properties": { "storage_url": { "description": "\nThe URL at which the set of references for this batch are stored. The file is a jsonl\nwith each line formatted according to\n:class:`ReferenceFileInput <libs.sdk.src.destiny_sdk.references.ReferenceFileInput>`.\n ", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Storage Url", "type": "string" }, "id": { "description": "The ID of the import batch", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportBatchStatus", "default": "created", "description": "The status of the batch." }, "import_record_id": { "description": "The ID of the import record this batch is associated with", "format": "uuid4", "title": "Import Record Id", "type": "string" }, "import_record": { "anyOf": [ { "$ref": "#/$defs/ImportRecordRead" }, { "type": "null" } ], "default": null, "description": "The parent import record." }, "import_results": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportResultRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The results from processing the batch.", "title": "Import Results" } }, "required": [ "storage_url", "id", "import_record_id" ], "title": "ImportBatchRead", "type": "object" }, "ImportBatchStatus": { "description": "Describes the status of an import batch.", "enum": [ "created", "started", "failed", "partially_failed", "completed" ], "title": "ImportBatchStatus", "type": "string" }, "ImportRecordRead": { "description": "Core import record class.", "properties": { "search_string": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The search string used to produce this import", "title": "Search String" }, "searched_at": { "description": "\nThe timestamp (including timezone) at which the search which produced\nthis import was conducted. If no timezone is included, the timestamp\nis assumed to be in UTC.\n ", "format": "date-time", "title": "Searched At", "type": "string" }, "processor_name": { "description": "The name of the processor that is importing the data.", "title": "Processor Name", "type": "string" }, "processor_version": { "description": "The version of the processor that is importing the data.", "title": "Processor Version", "type": "string" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\nAny additional notes regarding the import (eg. reason for importing, known\nissues).\n ", "title": "Notes" }, "expected_reference_count": { "description": "\nThe number of references expected to be included in this import.\n-1 is accepted if the number is unknown.\n", "minimum": -1, "title": "Expected Reference Count", "type": "integer" }, "source_name": { "description": "The source of the reference being imported (eg. Open Alex)", "title": "Source Name", "type": "string" }, "id": { "description": "The ID of the import record", "format": "uuid4", "title": "Id", "type": "string" }, "status": { "$ref": "#/$defs/ImportRecordStatus", "default": "created", "description": "The status of the import record" }, "batches": { "anyOf": [ { "items": { "$ref": "#/$defs/ImportBatchRead" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of batches for the import record", "title": "Batches" } }, "required": [ "processor_name", "processor_version", "expected_reference_count", "source_name", "id" ], "title": "ImportRecordRead", "type": "object" }, "ImportRecordStatus": { "description": "Describes the status of an import record.", "enum": [ "created", "started", "completed" ], "title": "ImportRecordStatus", "type": "string" }, "ImportResultRead": { "description": "Core import result class.", "properties": { "id": { "description": "The ID of the import result.", "format": "uuid4", "title": "Id", "type": "string" }, "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the reference created by this import result.", "title": "Reference Id" }, "failure_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The details of the failure, if the import result failed.", "title": "Failure Details" }, "import_batch": { "anyOf": [ { "$ref": "#/$defs/ImportBatchRead" }, { "type": "null" } ], "default": null, "description": "The parent import batch." } }, "required": [ "id" ], "title": "ImportResultRead", "type": "object" } }, "$ref": "#/$defs/ImportResultRead" }
- Fields:
- field failure_details: str | None = None[source]#
The details of the failure, if the import result failed.
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the import result.
- Constraints:
uuid_version = 4
- field import_batch: ImportBatchRead | None = None[source]#
The parent import batch.
- class libs.sdk.src.destiny_sdk.imports.ImportResultStatus(*values)[source]#
Describes the status of an import result.
- FAILED = 'failed'[source]#
The reference failed to be created. See the result’s failure_details field for more information.
Visibility#
Visibility enum for repository data.
Robots#
Schemas that define inputs/outputs for robots.
- pydantic model libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn[source]#
The model for requesting multiple enhancements on specific references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementRequestIn</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr><tr><td>source</td><td port="source">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.EnhancementRequestIn

The model for requesting multiple enhancements on specific references.&#\
xA;"];
}](../_images/graphviz-1a64000619b39ad6ba053c98882299d9ab098032.png)
Show JSON schema
{ "title": "EnhancementRequestIn", "description": "The model for requesting multiple enhancements on specific references.", "type": "object", "properties": { "robot_id": { "description": "The robot to be used to create the enhancements.", "format": "uuid4", "title": "Robot Id", "type": "string" }, "reference_ids": { "description": "The IDs of the references to be enhanced.", "items": { "format": "uuid4", "type": "string" }, "title": "Reference Ids", "type": "array" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the batch enhancement request.", "title": "Source" } }, "required": [ "robot_id", "reference_ids" ] }
- pydantic model libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead[source]#
Core batch enhancement request class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementRequestRead</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>reference_ids</td><td port="reference_ids">list[UUID]</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>request_status</td><td port="request_status">EnhancementRequestStatus</td></tr><tr><td>reference_data_url</td><td port="reference_data_url">HttpUrl | None</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl | None</td></tr><tr><td>validation_result_url</td><td port="validation_result_url">HttpUrl | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.EnhancementRequestRead

Core batch enhancement request class.
"];
}](../_images/graphviz-9c06f76a06e5ab2a6ca2df19c7b9c969e2c2805b.png)
Show JSON schema
{ "title": "EnhancementRequestRead", "description": "Core batch enhancement request class.", "type": "object", "properties": { "robot_id": { "description": "The robot to be used to create the enhancements.", "format": "uuid4", "title": "Robot Id", "type": "string" }, "reference_ids": { "description": "The IDs of the references to be enhanced.", "items": { "format": "uuid4", "type": "string" }, "title": "Reference Ids", "type": "array" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the batch enhancement request.", "title": "Source" }, "id": { "format": "uuid4", "title": "Id", "type": "string" }, "request_status": { "$ref": "#/$defs/EnhancementRequestStatus", "description": "The status of the request to create enhancements" }, "reference_data_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the set of references are stored. The file is a jsonl with each line\nformatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`.\n, one reference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n ", "title": "Reference Data Url" }, "result_storage_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the set of enhancements are stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nThis field is only relevant to robots.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n ", "title": "Result Storage Url" }, "validation_result_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the result of the enhancement request is stored.\nThis file is a txt file, one line per reference, with either an error\nor a success message.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n ", "title": "Validation Result Url" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the enhancement process. This is only used if the entire enhancement request failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.", "title": "Error" } }, "$defs": { "EnhancementRequestStatus": { "description": "The status of an enhancement request.", "enum": [ "received", "accepted", "processing", "rejected", "partial_failed", "failed", "importing", "indexing", "indexing_failed", "completed" ], "title": "EnhancementRequestStatus", "type": "string" } }, "required": [ "robot_id", "reference_ids", "id", "request_status" ] }
- field error: str | None = None[source]#
Error encountered during the enhancement process. This is only used if the entire enhancement request failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
- Constraints:
uuid_version = 4
- field reference_data_url: HttpUrl | None = None[source]#
The URL at which the set of references are stored. The file is a jsonl with each line formatted according to
Reference. , one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated usingGET /enhancement-requests/{request_id}/.
- field request_status: EnhancementRequestStatus [Required][source]#
The status of the request to create enhancements
- field result_storage_url: HttpUrl | None = None[source]#
The URL at which the set of enhancements are stored. The file is to be a jsonl with each line formatted according to
EnhancementResultEntry. This field is only relevant to robots. If the URL expires, a new one can be generated usingGET /enhancement-requests/{request_id}/.
- field robot_id: UUID4 [Required][source]#
The robot to be used to create the enhancements.
- Constraints:
uuid_version = 4
- field validation_result_url: HttpUrl | None = None[source]#
The URL at which the result of the enhancement request is stored. This file is a txt file, one line per reference, with either an error or a success message. If the URL expires, a new one can be generated using
GET /enhancement-requests/{request_id}/.
- class libs.sdk.src.destiny_sdk.robots.EnhancementRequestStatus(*values)[source]#
The status of an enhancement request.
- libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry[source]#
The result for a single reference when processed by an enhancement request. This is a single entry in the result file.
alias of
Annotated[Enhancement|LinkedRobotError, FieldInfo(annotation=NoneType, required=True)]
- pydantic model libs.sdk.src.destiny_sdk.robots.LinkedRobotError[source]#
A record of something going wrong when processing an individual reference.
Used in results for batch requests - in single requests, the reference id is derived from the request id.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.LinkedRobotError" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedRobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.LinkedRobotError

A record of something going wrong when processing an individual reference.&#\
xA;
Used in results for batch requests - in single requests, the reference
id is derived from the request id.
"];
}](../_images/graphviz-008b0afd03a1d777f17da0ba9eeeaf69b88b2fa3.png)
Show JSON schema
{ "title": "LinkedRobotError", "description": "A record of something going wrong when processing an individual reference.\n\nUsed in results for batch requests - in single requests, the reference\nid is derived from the request id.", "type": "object", "properties": { "message": { "description": "Message which describes the error encountered during processing", "title": "Message", "type": "string" }, "reference_id": { "description": "The ID of the reference which caused the error.", "format": "uuid4", "title": "Reference Id", "type": "string" } }, "required": [ "message", "reference_id" ] }
- field message: Annotated[str, Field(description='Message which describes the error encountered during processing')] [Required][source]#
Message which describes the error encountered during processing
- field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the reference which caused the error.
- Constraints:
uuid_version = 4
- pydantic model libs.sdk.src.destiny_sdk.robots.ProvisionedRobot[source]#
The model for a provisioned robot.
Used only when a robot is initially created, or when cycling a robot’s client_secret.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.ProvisionedRobot" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ProvisionedRobot</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>client_secret</td><td port="client_secret">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.ProvisionedRobot

The model for a provisioned robot.

Used only when a robot is \
initially created,
or when cycling a robot's client_secret.
"];
}](../_images/graphviz-9749ae90597a66fabe41ab7f39675fc3c2b3006c.png)
Show JSON schema
{ "title": "ProvisionedRobot", "description": "The model for a provisioned robot.\n\nUsed only when a robot is initially created,\nor when cycling a robot's client_secret.", "type": "object", "properties": { "name": { "description": "The name of the robot, must be unique.", "title": "Name", "type": "string" }, "description": { "description": "Description of the enhancement the robot provides.", "title": "Description", "type": "string" }, "owner": { "description": "The owner/publisher of the robot.", "title": "Owner", "type": "string" }, "id": { "description": "The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.", "format": "uuid4", "title": "Id", "type": "string" }, "client_secret": { "description": "The client secret of the robot, used as the secret key when sending HMAC authenticated requests.", "title": "Client Secret", "type": "string" } }, "additionalProperties": false, "required": [ "name", "description", "owner", "id", "client_secret" ] }
- Config:
extra: str = forbid
- Fields:
- field client_secret: str [Required][source]#
The client secret of the robot, used as the secret key when sending HMAC authenticated requests.
- pydantic model libs.sdk.src.destiny_sdk.robots.Robot[source]#
Then model for a registered robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.Robot" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Robot</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr><tr><td>id</td><td port="id">UUID</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.Robot

Then model for a registered robot.
"];
}](../_images/graphviz-eae68c6cd6499df79680c33b2718629ff70e2901.png)
Show JSON schema
{ "title": "Robot", "description": "Then model for a registered robot.", "type": "object", "properties": { "name": { "description": "The name of the robot, must be unique.", "title": "Name", "type": "string" }, "description": { "description": "Description of the enhancement the robot provides.", "title": "Description", "type": "string" }, "owner": { "description": "The owner/publisher of the robot.", "title": "Owner", "type": "string" }, "id": { "description": "The id of the robot provided by destiny repository. Used as the client_id when sending HMAC authenticated requests.", "format": "uuid4", "title": "Id", "type": "string" } }, "additionalProperties": false, "required": [ "name", "description", "owner", "id" ] }
- Config:
extra: str = forbid
- Fields:
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotAutomation[source]#
Core Robot Automation class.
This is used as a source of truth for an Elasticsearch index that percolates references or enhancements against the queries. If a query matches, a request is sent to the specified robot to perform the enhancement.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotAutomation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomation</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>query</td><td port="query">dict[str, Any]</td></tr><tr><td>id</td><td port="id">UUID</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotAutomation

Core Robot Automation class.

This is used as a source of truth \
for an Elasticsearch index that percolates
references or enhancements against the queries. If a query matches, a request
\
is sent to the specified robot to perform the enhancement.
"];
}](../_images/graphviz-93c22d2a20260d2a059b6bb8df7da9bc07e80d2d.png)
Show JSON schema
{ "title": "RobotAutomation", "description": "Core Robot Automation class.\n\nThis is used as a source of truth for an Elasticsearch index that percolates\nreferences or enhancements against the queries. If a query matches, a request\nis sent to the specified robot to perform the enhancement.", "type": "object", "properties": { "robot_id": { "description": "The ID of the robot that will be used to enhance the reference.", "format": "uuid4", "title": "Robot Id", "type": "string" }, "query": { "additionalProperties": true, "description": "The percolator query that will be used to match references or enhancements against.", "title": "Query", "type": "object" }, "id": { "description": "The ID of the robot automation.", "format": "uuid4", "title": "Id", "type": "string" } }, "required": [ "robot_id", "query", "id" ] }
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the robot automation.
- Constraints:
uuid_version = 4
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotAutomationIn[source]#
Automation model for a robot.
This is used as a source of truth for an Elasticsearch index that percolates references or enhancements against the queries. If a query matches, a request is sent to the specified robot to perform the enhancement.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotAutomationIn" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotAutomationIn</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>query</td><td port="query">dict[str, Any]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotAutomationIn

Automation model for a robot.

This is used as a source of truth \
for an Elasticsearch index that percolates
references or enhancements against the queries. If a query matches, a request
\
is sent to the specified robot to perform the enhancement.
"];
}](../_images/graphviz-dde9ff6bf643114a63e8a42e814644f3f20089de.png)
Show JSON schema
{ "title": "RobotAutomationIn", "description": "Automation model for a robot.\n\nThis is used as a source of truth for an Elasticsearch index that percolates\nreferences or enhancements against the queries. If a query matches, a request\nis sent to the specified robot to perform the enhancement.", "type": "object", "properties": { "robot_id": { "description": "The ID of the robot that will be used to enhance the reference.", "format": "uuid4", "title": "Robot Id", "type": "string" }, "query": { "additionalProperties": true, "description": "The percolator query that will be used to match references or enhancements against.", "title": "Query", "type": "object" } }, "required": [ "robot_id", "query" ] }
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatch[source]#
A robot enhancement batch from the repo to a robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatch" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatch</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_storage_url</td><td port="reference_storage_url">HttpUrl</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl</td></tr><tr><td>extra_fields</td><td port="extra_fields">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatch

A robot enhancement batch from the repo to a robot.
"];
}](../_images/graphviz-8823f60d389e58e398213f5af34cfaf3c709e474.png)
Show JSON schema
{ "title": "RobotEnhancementBatch", "description": "A robot enhancement batch from the repo to a robot.", "type": "object", "properties": { "id": { "format": "uuid4", "title": "Id", "type": "string" }, "reference_storage_url": { "description": "\nThe URL at which the set of references are stored. The file is a jsonl\nwith each line formatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`, one\nreference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Reference Storage Url", "type": "string" }, "result_storage_url": { "description": "\nThe URL at which the set of enhancements are to be stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Result Storage Url", "type": "string" }, "extra_fields": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Extra fields to pass to the robot. TBC.", "title": "Extra Fields" } }, "required": [ "id", "reference_storage_url", "result_storage_url" ] }
- Fields:
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
- Constraints:
uuid_version = 4
- field reference_storage_url: HttpUrl [Required][source]#
The URL at which the set of references are stored. The file is a jsonl with each line formatted according to
Reference, one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated usingGET /robot-enhancement-batches/{batch_id}/.
- field result_storage_url: HttpUrl [Required][source]#
The URL at which the set of enhancements are to be stored. The file is to be a jsonl with each line formatted according to
EnhancementResultEntry. If the URL expires, a new one can be generated usingGET /robot-enhancement-batches/{batch_id}/.
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead[source]#
Core robot enhancement batch class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatchRead</b></td></tr><tr><td>robot_id</td><td port="robot_id">UUID</td></tr><tr><td>source</td><td port="source">str | None</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_data_url</td><td port="reference_data_url">HttpUrl | None</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl | None</td></tr><tr><td>validation_result_url</td><td port="validation_result_url">HttpUrl | None</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchRead

Core robot enhancement batch class.
"];
}](../_images/graphviz-bcd0dd61ab19b10311e6f77451bb3b0fa378bd42.png)
Show JSON schema
{ "title": "RobotEnhancementBatchRead", "description": "Core robot enhancement batch class.", "type": "object", "properties": { "robot_id": { "description": "The robot to be used to create the enhancements.", "format": "uuid4", "title": "Robot Id", "type": "string" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The source of the batch enhancement request.", "title": "Source" }, "id": { "format": "uuid4", "title": "Id", "type": "string" }, "reference_data_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the set of references are stored. The file is a jsonl with each line\nformatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`.\n, one reference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n ", "title": "Reference Data Url" }, "result_storage_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the set of enhancements are stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nThis field is only relevant to robots.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n ", "title": "Result Storage Url" }, "validation_result_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\nThe URL at which the result of the enhancement request is stored.\nThis file is a txt file, one line per reference, with either an error\nor a success message.\nIf the URL expires, a new one can be generated using\n``GET /robot-enhancement-batches/{batch_id}/``.\n ", "title": "Validation Result Url" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the enhancement process. This is only used if the entire enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.", "title": "Error" } }, "required": [ "robot_id", "id" ] }
- Fields:
- field error: str | None = None[source]#
Error encountered during the enhancement process. This is only used if the entire enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it is passed in the validation result file.
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
- Constraints:
uuid_version = 4
- field reference_data_url: HttpUrl | None = None[source]#
The URL at which the set of references are stored. The file is a jsonl with each line formatted according to
Reference. , one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated usingGET /enhancement-requests/{request_id}/.
- field result_storage_url: HttpUrl | None = None[source]#
The URL at which the set of enhancements are stored. The file is to be a jsonl with each line formatted according to
EnhancementResultEntry. This field is only relevant to robots. If the URL expires, a new one can be generated usingGET /robot-enhancement-batches/{batch_id}/.
- field robot_id: UUID4 [Required][source]#
The robot to be used to create the enhancements.
- Constraints:
uuid_version = 4
- field validation_result_url: HttpUrl | None = None[source]#
The URL at which the result of the enhancement request is stored. This file is a txt file, one line per reference, with either an error or a success message. If the URL expires, a new one can be generated using
GET /robot-enhancement-batches/{batch_id}/.
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult[source]#
Used to indicate that the robot has finished processing a batch.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotEnhancementBatchResult</b></td></tr><tr><td>request_id</td><td port="request_id">UUID</td></tr><tr><td>error</td><td port="error">RobotError | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult

Used to indicate that the robot has finished processing a batch.&#\
xA;"];
"libs.sdk.src.destiny_sdk.robots.RobotError" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotError

A record of something going wrong with the robot.
"];
"libs.sdk.src.destiny_sdk.robots.RobotEnhancementBatchResult":error:e -> "libs.sdk.src.destiny_sdk.robots.RobotError":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-4a68e3cc9132e8fa442c84f687ce4b53f4614c05.png)
Show JSON schema
{ "title": "RobotEnhancementBatchResult", "description": "Used to indicate that the robot has finished processing a batch.", "type": "object", "properties": { "request_id": { "format": "uuid4", "title": "Request Id", "type": "string" }, "error": { "anyOf": [ { "$ref": "#/$defs/RobotError" }, { "type": "null" } ], "default": null, "description": "\nError the robot encountered while creating enhancements. If this field is populated,\nwe assume the entire robot enhancement batch failed,\nrather than an individual reference.\nIf there was an error with processing an individual reference, it should be passed in\nthe result file and this field should be left as None. Vice-versa, if this field is\nNone, the repository will assume that the result file is ready for processing.\n" } }, "$defs": { "RobotError": { "description": "A record of something going wrong with the robot.", "properties": { "message": { "description": "Message which describes the error encountered during processing", "title": "Message", "type": "string" } }, "required": [ "message" ], "title": "RobotError", "type": "object" } }, "required": [ "request_id" ] }
- field error: RobotError | None = None[source]#
Error the robot encountered while creating enhancements. If this field is populated, we assume the entire robot enhancement batch failed, rather than an individual reference. If there was an error with processing an individual reference, it should be passed in the result file and this field should be left as None. Vice-versa, if this field is None, the repository will assume that the result file is ready for processing.
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotError[source]#
A record of something going wrong with the robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotError" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotError

A record of something going wrong with the robot.
"];
}](../_images/graphviz-6774f057221e6e56f820cbb95e3b407aabe0b51a.png)
Show JSON schema
{ "title": "RobotError", "description": "A record of something going wrong with the robot.", "type": "object", "properties": { "message": { "description": "Message which describes the error encountered during processing", "title": "Message", "type": "string" } }, "required": [ "message" ] }
- Fields:
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotIn[source]#
The model for registering a new robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotIn" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotIn</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotIn

The model for registering a new robot.
"];
}](../_images/graphviz-43558eaa6fef001a86108b212855b27ae3ea173e.png)
Show JSON schema
{ "title": "RobotIn", "description": "The model for registering a new robot.", "type": "object", "properties": { "name": { "description": "The name of the robot, must be unique.", "title": "Name", "type": "string" }, "description": { "description": "Description of the enhancement the robot provides.", "title": "Description", "type": "string" }, "owner": { "description": "The owner/publisher of the robot.", "title": "Owner", "type": "string" } }, "additionalProperties": false, "required": [ "name", "description", "owner" ] }
- Config:
extra: str = forbid
- Fields:
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotRequest[source]#
A batch enhancement request from the repo to a robot.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotRequest" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotRequest</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>reference_storage_url</td><td port="reference_storage_url">HttpUrl</td></tr><tr><td>result_storage_url</td><td port="result_storage_url">HttpUrl</td></tr><tr><td>extra_fields</td><td port="extra_fields">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotRequest

A batch enhancement request from the repo to a robot.
"];
}](../_images/graphviz-72e266a6c962f8a563fbf2155fdd3989c6946553.png)
Show JSON schema
{ "title": "RobotRequest", "description": "A batch enhancement request from the repo to a robot.", "type": "object", "properties": { "id": { "format": "uuid4", "title": "Id", "type": "string" }, "reference_storage_url": { "description": "\nThe URL at which the set of references are stored. The file is a jsonl\nwith each line formatted according to\n:class:`Reference <libs.sdk.src.destiny_sdk.references.Reference>`, one\nreference per line.\nEach reference may have identifiers or enhancements attached, as\nrequired by the robot.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Reference Storage Url", "type": "string" }, "result_storage_url": { "description": "\nThe URL at which the set of enhancements are to be stored. The file is to be a jsonl\nwith each line formatted according to\n:class:`EnhancementResultEntry <libs.sdk.src.destiny_sdk.robots.EnhancementResultEntry>`.\nIf the URL expires, a new one can be generated using\n``GET /enhancement-requests/{request_id}/``.\n", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Result Storage Url", "type": "string" }, "extra_fields": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Extra fields to pass to the robot. TBC.", "title": "Extra Fields" } }, "required": [ "id", "reference_storage_url", "result_storage_url" ] }
- Fields:
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
- Constraints:
uuid_version = 4
- field reference_storage_url: HttpUrl [Required][source]#
The URL at which the set of references are stored. The file is a jsonl with each line formatted according to
Reference, one reference per line. Each reference may have identifiers or enhancements attached, as required by the robot. If the URL expires, a new one can be generated usingGET /enhancement-requests/{request_id}/.
- field result_storage_url: HttpUrl [Required][source]#
The URL at which the set of enhancements are to be stored. The file is to be a jsonl with each line formatted according to
EnhancementResultEntry. If the URL expires, a new one can be generated usingGET /enhancement-requests/{request_id}/.
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotResult[source]#
Used to indicate to the repository that the robot has finished processing.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotError" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotError</b></td></tr><tr><td>message</td><td port="message">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotError

A record of something going wrong with the robot.
"];
"libs.sdk.src.destiny_sdk.robots.RobotResult" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotResult</b></td></tr><tr><td>request_id</td><td port="request_id">UUID</td></tr><tr><td>error</td><td port="error">RobotError | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotResult

Used to indicate to the repository that the robot has finished processing.&#\
xA;"];
"libs.sdk.src.destiny_sdk.robots.RobotResult":error:e -> "libs.sdk.src.destiny_sdk.robots.RobotError":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-933a074461cfe59b014eee58da6349f1b12d974f.png)
Show JSON schema
{ "title": "RobotResult", "description": "Used to indicate to the repository that the robot has finished processing.", "type": "object", "properties": { "request_id": { "format": "uuid4", "title": "Request Id", "type": "string" }, "error": { "anyOf": [ { "$ref": "#/$defs/RobotError" }, { "type": "null" } ], "default": null, "description": "\nError the robot encountered while creating enhancements. If this field is populated,\nwe assume the entire enhancement request or http request request failed,\nrather than an individual reference.\nIf there was an error with processing an individual reference, it should be passed in\nthe result file and this field should be left as None. Vice-versa, if this field is\nNone, the repository will assume that the result file is ready for processing.\n" } }, "$defs": { "RobotError": { "description": "A record of something going wrong with the robot.", "properties": { "message": { "description": "Message which describes the error encountered during processing", "title": "Message", "type": "string" } }, "required": [ "message" ], "title": "RobotError", "type": "object" } }, "required": [ "request_id" ] }
- field error: RobotError | None = None[source]#
Error the robot encountered while creating enhancements. If this field is populated, we assume the entire enhancement request or http request request failed, rather than an individual reference. If there was an error with processing an individual reference, it should be passed in the result file and this field should be left as None. Vice-versa, if this field is None, the repository will assume that the result file is ready for processing.
- pydantic model libs.sdk.src.destiny_sdk.robots.RobotResultValidationEntry[source]#
A single entry in the validation result file for a batch enhancement request.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.robots.RobotResultValidationEntry" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>RobotResultValidationEntry</b></td></tr><tr><td>reference_id</td><td port="reference_id">Optional[UUID]</td></tr><tr><td>error</td><td port="error">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.robots.RobotResultValidationEntry

A single entry in the validation result file for a batch enhancement \
request.
"];
}](../_images/graphviz-ab7303978acbe371528e9ff21d74a32fd012c540.png)
Show JSON schema
{ "title": "RobotResultValidationEntry", "description": "A single entry in the validation result file for a batch enhancement request.", "type": "object", "properties": { "reference_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the reference which was enhanced. If this is empty, the EnhancementResultEntry could not be parsed.", "title": "Reference Id" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error encountered during the enhancement process for this reference. If this is empty, the enhancement was successfully created.", "title": "Error" } } }
- field error: str | None = None[source]#
Error encountered during the enhancement process for this reference. If this is empty, the enhancement was successfully created.
- field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None[source]#
The ID of the reference which was enhanced. If this is empty, the EnhancementResultEntry could not be parsed.
Enhancements#
Enhancement classes for the Destiny Repository.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement[source]#
An enhancement which is specific to the abstract of a reference.
This is separate from the BibliographicMetadata for two reasons:
1. Abstracts are increasingly missing from sources like OpenAlex, and may be backfilled from other sources, without the bibliographic metadata. 2. They are also subject to copyright limitations in ways which metadata are not, and thus need separate visibility controls.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a \
reference.

This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also \
subject to copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
}](../_images/graphviz-80291d67b26ccaeb8d7ceb8cb60c8cb9cf687216.png)
Show JSON schema
{ "title": "AbstractContentEnhancement", "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "type": "object", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "$defs": { "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" } }, "required": [ "process", "abstract" ] }
- Fields:
- field process: AbstractProcessType [Required][source]#
The process used to acquire the abstract.
- class libs.sdk.src.destiny_sdk.enhancements.AbstractProcessType(*values)[source]#
The process used to acquire the abstract.
- libs.sdk.src.destiny_sdk.enhancements.Annotation[source]#
Union type for all annotations.
alias of
Annotated[BooleanAnnotation|ScoreAnnotation, FieldInfo(annotation=NoneType, required=True, discriminator=’annotation_type’)]
- pydantic model libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement[source]#
An enhancement which is composed of a list of Annotations.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.&#\
xA;"];
"libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some \
kind.

This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This \
is similar to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../_images/graphviz-90544f4cd67deba46db5345ee43a2f24553ec0c1.png)
Show JSON schema
{ "title": "AnnotationEnhancement", "description": "An enhancement which is composed of a list of Annotations.", "type": "object", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "$defs": { "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" } }, "required": [ "annotations" ] }
- Fields:
- field annotations: list[Annotated[BooleanAnnotation | ScoreAnnotation, FieldInfo(annotation=NoneType, required=True, discriminator='annotation_type')]] [Required][source]#
- Constraints:
min_length = 1
- class libs.sdk.src.destiny_sdk.enhancements.AnnotationType(*values)[source]#
The type of annotation.
This is used to identify the type of annotation in the Annotation class.
- class libs.sdk.src.destiny_sdk.enhancements.AuthorPosition(*values)[source]#
The position of an author in a list of authorships.
Maps to the data from OpenAlex.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.Authorship[source]#
Represents a single author and their association with a reference.
This is a simplification of the OpenAlex [Authorship object](https://docs.openalex.org/api-entities/works/work-object/authorship-object) for our purposes.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.
&#\
xA;This is a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
}](../_images/graphviz-182a03ba068651343f1259db5c440f9aa99c6683.png)
Show JSON schema
{ "title": "Authorship", "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "type": "object", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "$defs": { "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" } }, "required": [ "display_name", "position" ] }
- Fields:
- field position: AuthorPosition [Required][source]#
The position of the author within the list of authors.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement[source]#
An enhancement which is made up of bibliographic metadata.
Generally this will be sourced from a database such as OpenAlex or similar. For directly contributed references, these may not be complete.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.
&#\
xA;This is a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic \
metadata.

Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, \
these may not be complete.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-33f165a5261b35b73a649893fb0d7555dbc9d092.png)
Show JSON schema
{ "title": "BibliographicMetadataEnhancement", "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "type": "object", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } }, "$defs": { "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" } } }
- Fields:
- field authorship: list[Authorship] | None = None[source]#
A list of Authorships belonging to this reference.
- field cited_by_count: int | None = None[source]#
(From OpenAlex) The number of citations to this work. These are the times that other works have cited this work
- field enhancement_type: Literal[EnhancementType.BIBLIOGRAPHIC] = EnhancementType.BIBLIOGRAPHIC[source]#
- field publication_date: date | None = None[source]#
The date which the version of record was published.
- field publication_year: int | None = None[source]#
The year in which the version of record was published.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation[source]#
An annotation is a way of tagging the content with a label of some kind.
This class will probably be broken up in the future, but covers most of our initial cases.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some \
kind.

This class will probably be broken up in the future, but covers most of our
initial cases.
"];
}](../_images/graphviz-0be5eef10b91d3dd9572e162e62939e93d6a44fc.png)
Show JSON schema
{ "title": "BooleanAnnotation", "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "type": "object", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ] }
- Fields:
- field data: dict [Optional][source]#
An object representation of the annotation including any confidence scores or descriptions.
- class libs.sdk.src.destiny_sdk.enhancements.DriverVersion(*values)[source]#
The version based on the DRIVER guidelines versioning scheme.
(Borrowed from OpenAlex)
- ACCEPTED_VERSION = 'acceptedVersion'[source]#
The document after having completed peer review and being officially accepted for publication. It will lack publisher formatting, but the content should be interchangeable with that of the publishedVersion.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.Enhancement[source]#
Core enhancement class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a \
reference.

This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also \
subject to copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.&#\
xA;"];
"libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some \
kind.

This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This \
is similar to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.
&#\
xA;This is a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic \
metadata.

Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, \
these may not be complete.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">Optional[UUID]</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Enhancement

Core enhancement class.
"];
"libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference \
can be found.

This maps closely (almost exactly) to OpenAlex's locations.
"];
"libs.sdk.src.destiny_sdk.enhancements.Enhancement":content:e -> "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely \
to the OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../_images/graphviz-c73fe041cb5dee0f353b6612b3f83b9c3c5605d2.png)
Show JSON schema
{ "title": "Enhancement", "description": "Core enhancement class.", "type": "object", "properties": { "id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.", "title": "Id" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid4", "title": "Reference Id", "type": "string" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid4", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "location": "#/$defs/LocationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" } ], "title": "Content" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "reference_id", "source", "visibility", "content" ] }
- Fields:
- field content: Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator='enhancement_type'), FieldInfo(annotation=NoneType, required=True, description='The content of the enhancement.', discriminator='enhancement_type')] [Required][source]#
The content of the enhancement.
- field derived_from: list[Annotated[UUID, UuidVersion(uuid_version=4)]] | None = None[source]#
List of enhancement IDs that this enhancement was derived from.
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None[source]#
The ID of the enhancement. Populated by the repository when sending enhancements with references.
- field reference_id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the reference this enhancement is associated with.
- Constraints:
uuid_version = 4
- field robot_version: str | None = None[source]#
The version of the robot that generated the content.
- field visibility: Visibility [Required][source]#
The level of visibility of the enhancement
- libs.sdk.src.destiny_sdk.enhancements.EnhancementContent[source]#
Union type for all enhancement content types.
alias of
Annotated[BibliographicMetadataEnhancement|AbstractContentEnhancement|AnnotationEnhancement|LocationEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator=’enhancement_type’)]
- pydantic model libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput[source]#
Enhancement model used to marshall a file input to new references.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a \
reference.

This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing \
from sources like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also \
subject to copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.&#\
xA;"];
"libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some \
kind.

This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This \
is similar to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.
&#\
xA;This is a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic \
metadata.

Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, \
these may not be complete.
"];
"libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "libs.sdk.src.destiny_sdk.enhancements.Authorship":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementFileInput</b></td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput

Enhancement model used to marshall a file input to new references.&#\
xA;"];
"libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference \
can be found.

This maps closely (almost exactly) to OpenAlex's locations.
"];
"libs.sdk.src.destiny_sdk.enhancements.EnhancementFileInput":content:e -> "libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely \
to the OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../_images/graphviz-979a06ef8bb327a92bcbe634afd0a530bc77115b.png)
Show JSON schema
{ "title": "EnhancementFileInput", "description": "Enhancement model used to marshall a file input to new references.", "type": "object", "properties": { "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "processor_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Processor Version" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "location": "#/$defs/LocationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" } ], "title": "Content" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "source", "visibility", "content" ] }
- Fields:
- field content: Annotated[BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement, FieldInfo(annotation=NoneType, required=True, discriminator='enhancement_type')] [Required][source]#
The content of the enhancement.
- field robot_version: str | None = None (alias 'processor_version')[source]#
The version of the robot that generated the content.
- field visibility: Visibility [Required][source]#
The level of visibility of the enhancement
- class libs.sdk.src.destiny_sdk.enhancements.EnhancementType(*values)[source]#
The type of enhancement.
This is used to identify the type of enhancement in the Enhancement class.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.Location[source]#
A location where a reference can be found.
This maps almost completely to the OpenAlex [Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely \
to the OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
}](../_images/graphviz-aba4aceccf75e84e4fcdc4ba4825a8905dd4b791.png)
Show JSON schema
{ "title": "Location", "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "type": "object", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "$defs": { "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" } } }
- Fields:
- field is_oa: bool | None = None[source]#
(From OpenAlex): True if an Open Access (OA) version of this work is available at this location. May be left as null if this is unknown (and thus) treated effectively as false.
- field landing_page_url: HttpUrl | None = None[source]#
(From OpenAlex): The landing page URL for this location.
- field license: str | None = None[source]#
(From OpenAlex): The location’s publishing license. This can be a Creative Commons license such as cc0 or cc-by, a publisher-specific license, or null which means we are not able to determine a license for this location.
- field pdf_url: HttpUrl | None = None[source]#
(From OpenAlex): A URL where you can find this location as a PDF.
- field version: DriverVersion | None = None[source]#
The version (according to the DRIVER versioning scheme) of this location.
- pydantic model libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement[source]#
An enhancement which describes locations where this reference can be found.
This maps closely (almost exactly) to OpenAlex’s locations.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely \
to the OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference \
can be found.

This maps closely (almost exactly) to OpenAlex's locations.
"];
"libs.sdk.src.destiny_sdk.enhancements.LocationEnhancement":locations:e -> "libs.sdk.src.destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
}](../_images/graphviz-3dc62276138ceeaff086bf74b81c3f09806270b2.png)
Show JSON schema
{ "title": "LocationEnhancement", "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "type": "object", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "$defs": { "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" } }, "required": [ "locations" ] }
- Fields:
- pydantic model libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation[source]#
An annotation which represents the score for a label.
This is similar to a BooleanAnnotation, but lacks a boolean determination as to the application of the label.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This \
is similar to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
}](../_images/graphviz-c4032fc437c693ad196ff91913ee52bef41811c1.png)
Show JSON schema
{ "title": "ScoreAnnotation", "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "type": "object", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ] }
- Fields:
- field data: dict [Optional][source]#
An object representation of the annotation including any confidence scores or descriptions.
Identifiers#
Identifier classes for the Destiny SDK.
- pydantic model libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier[source]#
An external identifier representing a DOI.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
}](../_images/graphviz-d9041f326b5d0790f266bca6d88c44028df5e3c1.png)
Show JSON schema
{ "title": "DOIIdentifier", "description": "An external identifier representing a DOI.", "type": "object", "properties": { "identifier": { "description": "The DOI of the reference.", "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ] }
- Fields:
- Validators:
- field identifier: str [Required][source]#
The DOI of the reference.
- Constraints:
pattern = ^10.d{4,9}/[-._;()/:a-zA-Z0-9%<>[]+&]+$
- Validated by:
- field identifier_type: Literal[ExternalIdentifierType.DOI] = ExternalIdentifierType.DOI[source]#
The type of identifier used.
- validator remove_doi_url » identifier[source]#
Remove the URL part of the DOI if it exists.
- libs.sdk.src.destiny_sdk.identifiers.ExternalIdentifier[source]#
Union type for all external identifiers.
alias of
Annotated[DOIIdentifier|PubMedIdentifier|OpenAlexIdentifier|OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator=’identifier_type’)]
- class libs.sdk.src.destiny_sdk.identifiers.ExternalIdentifierType(*values)[source]#
The type of identifier used to identify a reference.
This is used to identify the type of identifier used in the ExternalIdentifier class.
- pydantic model libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier[source]#
An external identifier which identifies a reference.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LinkedExternalIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier

An external identifier which identifies a reference.
"];
"libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"libs.sdk.src.destiny_sdk.identifiers.LinkedExternalIdentifier":identifier:e -> "libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-c15ec278858bbae7455f4833beb38653167092ae.png)
Show JSON schema
{ "title": "LinkedExternalIdentifier", "description": "An external identifier which identifies a reference.", "type": "object", "properties": { "identifier": { "description": "The identifier of the reference.", "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ], "title": "Identifier" }, "reference_id": { "description": "The ID of the reference this identifier identifies.", "format": "uuid4", "title": "Reference Id", "type": "string" } }, "$defs": { "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference.", "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference.", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID of the reference.", "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" } }, "required": [ "identifier", "reference_id" ] }
- Fields:
- field identifier: Annotated[DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')] [Required][source]#
The identifier of the reference.
- pydantic model libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier[source]#
An external identifier representing an OpenAlex ID.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
}](../_images/graphviz-2338549ca7c66a35075c403f76acad4753bd0769.png)
Show JSON schema
{ "title": "OpenAlexIdentifier", "description": "An external identifier representing an OpenAlex ID.", "type": "object", "properties": { "identifier": { "description": "The OpenAlex ID of the reference.", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ] }
- Fields:
- Validators:
- field identifier: str [Required][source]#
The OpenAlex ID of the reference.
- Constraints:
pattern = ^Wd+$
- Validated by:
- field identifier_type: Literal[ExternalIdentifierType.OPEN_ALEX] = ExternalIdentifierType.OPEN_ALEX[source]#
The type of identifier used.
- validator remove_open_alex_url » identifier[source]#
Remove the OpenAlex URL if it exists.
- pydantic model libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier[source]#
An external identifier not otherwise defined by the repository.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
}](../_images/graphviz-c40abb3eba758e079752cd346b56a7b0b473ac41.png)
Show JSON schema
{ "title": "OtherIdentifier", "description": "An external identifier not otherwise defined by the repository.", "type": "object", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ] }
- Fields:
- pydantic model libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier[source]#
An external identifier representing a PubMed ID.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
}](../_images/graphviz-610eb982a4a3201eb911c510e6fac3d7c3f39408.png)
Show JSON schema
{ "title": "PubMedIdentifier", "description": "An external identifier representing a PubMed ID.", "type": "object", "properties": { "identifier": { "description": "The PubMed ID of the reference.", "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ] }
- Fields:
References#
Reference classes for the Destiny SDK.
- pydantic model libs.sdk.src.destiny_sdk.references.Reference[source]#
Core reference class.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Enhancement</b></td></tr><tr><td>id</td><td port="id">Optional[UUID]</td></tr><tr><td>reference_id</td><td port="reference_id">UUID</td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>derived_from</td><td port="derived_from">list[UUID] | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Enhancement

Core enhancement class.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"destiny_sdk.enhancements.Enhancement":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"libs.sdk.src.destiny_sdk.references.Reference" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Reference</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>identifiers</td><td port="identifiers">list[DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[Enhancement] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.references.Reference

Core reference class.
"];
"libs.sdk.src.destiny_sdk.references.Reference":enhancements:e -> "destiny_sdk.enhancements.Enhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.Reference":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-9ba219b063b61190909fe706210fbefe409de220.png)
Show JSON schema
{ "title": "Reference", "description": "Core reference class.", "type": "object", "properties": { "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "id": { "description": "The ID of the reference", "format": "uuid4", "title": "Id", "type": "string" }, "identifiers": { "anyOf": [ { "items": { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `ExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/Enhancement" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference.", "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "Enhancement": { "description": "Core enhancement class.", "properties": { "id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ID of the enhancement. Populated by the repository when sending enhancements with references.", "title": "Id" }, "reference_id": { "description": "The ID of the reference this enhancement is associated with.", "format": "uuid4", "title": "Reference Id", "type": "string" }, "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "robot_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Robot Version" }, "derived_from": { "anyOf": [ { "items": { "format": "uuid4", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of enhancement IDs that this enhancement was derived from.", "title": "Derived From" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "location": "#/$defs/LocationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" } ], "title": "Content" } }, "required": [ "reference_id", "source", "visibility", "content" ], "title": "Enhancement", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference.", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID of the reference.", "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } }, "required": [ "id" ] }
- field enhancements: list[Enhancement] | None = None[source]#
A list of enhancements for the reference
- field id: Annotated[UUID, UuidVersion(uuid_version=4)] [Required][source]#
The ID of the reference
- Constraints:
uuid_version = 4
- field identifiers: list[Annotated[DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]] | None = None[source]#
A list of ExternalIdentifiers for the Reference
- field visibility: Visibility = Visibility.PUBLIC[source]#
The level of visibility of the reference
- classmethod from_es(es_reference: dict) Self[source]#
Create a Reference from an Elasticsearch document.
- pydantic model libs.sdk.src.destiny_sdk.references.ReferenceFileInput[source]#
Enhancement model used to marshall a file input.
Show Entity Relationship Diagram
![digraph "Entity Relationship Diagram created by erdantic" {
graph [fontcolor=gray66,
fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=9,
nodesep=0.5,
rankdir=LR,
ranksep=1.5
];
node [fontname="Times New Roman,Times,Liberation Serif,serif",
fontsize=14,
label="\N",
shape=plain
];
edge [dir=both];
"destiny_sdk.enhancements.AbstractContentEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AbstractContentEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ABSTRACT]</td></tr><tr><td>process</td><td port="process">AbstractProcessType</td></tr><tr><td>abstract</td><td port="abstract">str</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AbstractContentEnhancement

An enhancement which is specific to the abstract of a reference.
&#\
xA;This is separate from the `BibliographicMetadata` for two reasons:

1. Abstracts are increasingly missing from sources \
like OpenAlex, and may be
backfilled from other sources, without the bibliographic metadata.
2. They are also subject to \
copyright limitations in ways which metadata are
not, and thus need separate visibility controls.
"];
"destiny_sdk.enhancements.AnnotationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>AnnotationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.ANNOTATION]</td></tr><tr><td>annotations</td><td port="annotations">list[BooleanAnnotation | ScoreAnnotation]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.AnnotationEnhancement

An enhancement which is composed of a list of Annotations.
"];
"destiny_sdk.enhancements.BooleanAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BooleanAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.BOOLEAN]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>value</td><td port="value">bool</td></tr><tr><td>score</td><td port="score">float | None</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BooleanAnnotation

An annotation is a way of tagging the content with a label of some kind.
&#\
xA;This class will probably be broken up in the future, but covers most of our
initial cases.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.BooleanAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.ScoreAnnotation" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ScoreAnnotation</b></td></tr><tr><td>annotation_type</td><td port="annotation_type">Literal[AnnotationType.SCORE]</td></tr><tr><td>scheme</td><td port="scheme">str</td></tr><tr><td>label</td><td port="label">str</td></tr><tr><td>score</td><td port="score">float</td></tr><tr><td>data</td><td port="data">dict</td></tr></table>>,
tooltip="destiny_sdk.enhancements.ScoreAnnotation

An annotation which represents the score for a label.

This is similar \
to a BooleanAnnotation, but lacks a boolean determination
as to the application of the label.
"];
"destiny_sdk.enhancements.AnnotationEnhancement":annotations:e -> "destiny_sdk.enhancements.ScoreAnnotation":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.enhancements.Authorship" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Authorship</b></td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>orcid</td><td port="orcid">str | None</td></tr><tr><td>position</td><td port="position">AuthorPosition</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Authorship

Represents a single author and their association with a reference.

This is \
a simplification of the OpenAlex [Authorship
object](https://docs.openalex.org/api-entities/works/work-object/authorship-object)&#\
xA;for our purposes.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>BibliographicMetadataEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.BIBLIOGRAPHIC]</td></tr><tr><td>authorship</td><td port="authorship">list[Authorship] | None</td></tr><tr><td>cited_by_count</td><td port="cited_by_count">int | None</td></tr><tr><td>created_date</td><td port="created_date">date | None</td></tr><tr><td>publication_date</td><td port="publication_date">date | None</td></tr><tr><td>publication_year</td><td port="publication_year">int | None</td></tr><tr><td>publisher</td><td port="publisher">str | None</td></tr><tr><td>title</td><td port="title">str | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.BibliographicMetadataEnhancement

An enhancement which is made up of bibliographic metadata.
&#\
xA;Generally this will be sourced from a database such as OpenAlex or similar.
For directly contributed references, these may \
not be complete.
"];
"destiny_sdk.enhancements.BibliographicMetadataEnhancement":authorship:e -> "destiny_sdk.enhancements.Authorship":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EnhancementFileInput</b></td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>robot_version</td><td port="robot_version">str | None</td></tr><tr><td>content</td><td port="content">BibliographicMetadataEnhancement | AbstractContentEnhancement | AnnotationEnhancement | LocationEnhancement</td></tr></table>>,
tooltip="destiny_sdk.enhancements.EnhancementFileInput

Enhancement model used to marshall a file input to new references.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AbstractContentEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.AnnotationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.BibliographicMetadataEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.LocationEnhancement" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>LocationEnhancement</b></td></tr><tr><td>enhancement_type</td><td port="enhancement_type">Literal[EnhancementType.LOCATION]</td></tr><tr><td>locations</td><td port="locations">list[Location]</td></tr></table>>,
tooltip="destiny_sdk.enhancements.LocationEnhancement

An enhancement which describes locations where this reference can be found.&#\
xA;
This maps closely (almost exactly) to OpenAlex's locations.
"];
"destiny_sdk.enhancements.EnhancementFileInput":content:e -> "destiny_sdk.enhancements.LocationEnhancement":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"destiny_sdk.enhancements.Location" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Location</b></td></tr><tr><td>is_oa</td><td port="is_oa">bool | None</td></tr><tr><td>version</td><td port="version">DriverVersion | None</td></tr><tr><td>landing_page_url</td><td port="landing_page_url">HttpUrl | None</td></tr><tr><td>pdf_url</td><td port="pdf_url">HttpUrl | None</td></tr><tr><td>license</td><td port="license">str | None</td></tr><tr><td>extra</td><td port="extra">dict | None</td></tr></table>>,
tooltip="destiny_sdk.enhancements.Location

A location where a reference can be found.

This maps almost completely to the \
OpenAlex
[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)
"];
"destiny_sdk.enhancements.LocationEnhancement":locations:e -> "destiny_sdk.enhancements.Location":_root:w [arrowhead=crownone,
arrowtail=nonenone];
"destiny_sdk.identifiers.DOIIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DOIIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.DOI]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.DOIIdentifier

An external identifier representing a DOI.
"];
"destiny_sdk.identifiers.OpenAlexIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OpenAlexIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OPEN_ALEX]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OpenAlexIdentifier

An external identifier representing an OpenAlex ID.
"];
"destiny_sdk.identifiers.OtherIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>OtherIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">str</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.OTHER]</td></tr><tr><td>other_identifier_name</td><td port="other_identifier_name">str</td></tr></table>>,
tooltip="destiny_sdk.identifiers.OtherIdentifier

An external identifier not otherwise defined by the repository.
"];
"destiny_sdk.identifiers.PubMedIdentifier" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>PubMedIdentifier</b></td></tr><tr><td>identifier</td><td port="identifier">int</td></tr><tr><td>identifier_type</td><td port="identifier_type">Literal[ExternalIdentifierType.PM_ID]</td></tr></table>>,
tooltip="destiny_sdk.identifiers.PubMedIdentifier

An external identifier representing a PubMed ID.
"];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>ReferenceFileInput</b></td></tr><tr><td>visibility</td><td port="visibility">Visibility</td></tr><tr><td>identifiers</td><td port="identifiers">list[DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier] | None</td></tr><tr><td>enhancements</td><td port="enhancements">list[EnhancementFileInput] | None</td></tr></table>>,
tooltip="libs.sdk.src.destiny_sdk.references.ReferenceFileInput

Enhancement model used to marshall a file input.
"];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput":enhancements:e -> "destiny_sdk.enhancements.EnhancementFileInput":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.DOIIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OpenAlexIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.OtherIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
"libs.sdk.src.destiny_sdk.references.ReferenceFileInput":identifiers:e -> "destiny_sdk.identifiers.PubMedIdentifier":_root:w [arrowhead=noneteetee,
arrowtail=nonenone];
}](../_images/graphviz-84727d7b33a72bb0d5549924a152da125cf9b041.png)
Show JSON schema
{ "title": "ReferenceFileInput", "description": "Enhancement model used to marshall a file input.", "type": "object", "properties": { "visibility": { "$ref": "#/$defs/Visibility", "default": "public", "description": "The level of visibility of the reference" }, "identifiers": { "anyOf": [ { "items": { "discriminator": { "mapping": { "doi": "#/$defs/DOIIdentifier", "open_alex": "#/$defs/OpenAlexIdentifier", "other": "#/$defs/OtherIdentifier", "pm_id": "#/$defs/PubMedIdentifier" }, "propertyName": "identifier_type" }, "oneOf": [ { "$ref": "#/$defs/DOIIdentifier" }, { "$ref": "#/$defs/PubMedIdentifier" }, { "$ref": "#/$defs/OpenAlexIdentifier" }, { "$ref": "#/$defs/OtherIdentifier" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `ExternalIdentifiers` for the Reference", "title": "Identifiers" }, "enhancements": { "anyOf": [ { "items": { "$ref": "#/$defs/EnhancementFileInput" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of enhancements for the reference", "title": "Enhancements" } }, "$defs": { "AbstractContentEnhancement": { "description": "An enhancement which is specific to the abstract of a reference.\n\nThis is separate from the `BibliographicMetadata` for two reasons:\n\n1. Abstracts are increasingly missing from sources like OpenAlex, and may be\nbackfilled from other sources, without the bibliographic metadata.\n2. They are also subject to copyright limitations in ways which metadata are\nnot, and thus need separate visibility controls.", "properties": { "enhancement_type": { "const": "abstract", "default": "abstract", "title": "Enhancement Type", "type": "string" }, "process": { "$ref": "#/$defs/AbstractProcessType" }, "abstract": { "description": "The abstract of the reference.", "title": "Abstract", "type": "string" } }, "required": [ "process", "abstract" ], "title": "AbstractContentEnhancement", "type": "object" }, "AbstractProcessType": { "description": "The process used to acquire the abstract.", "enum": [ "uninverted", "closed_api", "other" ], "title": "AbstractProcessType", "type": "string" }, "AnnotationEnhancement": { "description": "An enhancement which is composed of a list of Annotations.", "properties": { "enhancement_type": { "const": "annotation", "default": "annotation", "title": "Enhancement Type", "type": "string" }, "annotations": { "items": { "discriminator": { "mapping": { "boolean": "#/$defs/BooleanAnnotation", "score": "#/$defs/ScoreAnnotation" }, "propertyName": "annotation_type" }, "oneOf": [ { "$ref": "#/$defs/BooleanAnnotation" }, { "$ref": "#/$defs/ScoreAnnotation" } ] }, "minItems": 1, "title": "Annotations", "type": "array" } }, "required": [ "annotations" ], "title": "AnnotationEnhancement", "type": "object" }, "AuthorPosition": { "description": "The position of an author in a list of authorships.\n\nMaps to the data from OpenAlex.", "enum": [ "first", "middle", "last" ], "title": "AuthorPosition", "type": "string" }, "Authorship": { "description": "Represents a single author and their association with a reference.\n\nThis is a simplification of the OpenAlex [Authorship\nobject](https://docs.openalex.org/api-entities/works/work-object/authorship-object)\nfor our purposes.", "properties": { "display_name": { "description": "The display name of the author.", "title": "Display Name", "type": "string" }, "orcid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ORCid of the author.", "title": "Orcid" }, "position": { "$ref": "#/$defs/AuthorPosition", "description": "The position of the author within the list of authors." } }, "required": [ "display_name", "position" ], "title": "Authorship", "type": "object" }, "BibliographicMetadataEnhancement": { "description": "An enhancement which is made up of bibliographic metadata.\n\nGenerally this will be sourced from a database such as OpenAlex or similar.\nFor directly contributed references, these may not be complete.", "properties": { "enhancement_type": { "const": "bibliographic", "default": "bibliographic", "title": "Enhancement Type", "type": "string" }, "authorship": { "anyOf": [ { "items": { "$ref": "#/$defs/Authorship" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of `Authorships` belonging to this reference.", "title": "Authorship" }, "cited_by_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex) The number of citations to this work. These are the times that\nother works have cited this work\n", "title": "Cited By Count" }, "created_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The ISO8601 date this metadata record was created", "title": "Created Date" }, "publication_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "The date which the version of record was published.", "title": "Publication Date" }, "publication_year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year in which the version of record was published.", "title": "Publication Year" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the entity which published the version of record.", "title": "Publisher" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the reference.", "title": "Title" } }, "title": "BibliographicMetadataEnhancement", "type": "object" }, "BooleanAnnotation": { "description": "An annotation is a way of tagging the content with a label of some kind.\n\nThis class will probably be broken up in the future, but covers most of our\ninitial cases.", "properties": { "annotation_type": { "const": "boolean", "default": "boolean", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of the annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "value": { "description": "Boolean flag for this annotation", "title": "Value", "type": "boolean" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A confidence score for this annotation", "title": "Score" }, "data": { "additionalProperties": true, "description": "\nAn object representation of the annotation including any confidence scores or\ndescriptions.\n", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "value" ], "title": "BooleanAnnotation", "type": "object" }, "DOIIdentifier": { "description": "An external identifier representing a DOI.", "properties": { "identifier": { "description": "The DOI of the reference.", "pattern": "^10\\.\\d{4,9}/[-._;()/:a-zA-Z0-9%<>\\[\\]+&]+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "doi", "default": "doi", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "DOIIdentifier", "type": "object" }, "DriverVersion": { "description": "The version based on the DRIVER guidelines versioning scheme.\n\n(Borrowed from OpenAlex)", "enum": [ "publishedVersion", "acceptedVersion", "submittedVersion", "other" ], "title": "DriverVersion", "type": "string" }, "EnhancementFileInput": { "description": "Enhancement model used to marshall a file input to new references.", "properties": { "source": { "description": "The enhancement source for tracking provenance.", "title": "Source", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "description": "The level of visibility of the enhancement" }, "processor_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version of the robot that generated the content.", "title": "Processor Version" }, "content": { "description": "The content of the enhancement.", "discriminator": { "mapping": { "abstract": "#/$defs/AbstractContentEnhancement", "annotation": "#/$defs/AnnotationEnhancement", "bibliographic": "#/$defs/BibliographicMetadataEnhancement", "location": "#/$defs/LocationEnhancement" }, "propertyName": "enhancement_type" }, "oneOf": [ { "$ref": "#/$defs/BibliographicMetadataEnhancement" }, { "$ref": "#/$defs/AbstractContentEnhancement" }, { "$ref": "#/$defs/AnnotationEnhancement" }, { "$ref": "#/$defs/LocationEnhancement" } ], "title": "Content" } }, "required": [ "source", "visibility", "content" ], "title": "EnhancementFileInput", "type": "object" }, "Location": { "description": "A location where a reference can be found.\n\nThis maps almost completely to the OpenAlex\n[Location object](https://docs.openalex.org/api-entities/works/work-object/location-object)", "properties": { "is_oa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): True if an Open Access (OA) version of this work is available\nat this location. May be left as null if this is unknown (and thus)\ntreated effectively as `false`.\n", "title": "Is Oa" }, "version": { "anyOf": [ { "$ref": "#/$defs/DriverVersion" }, { "type": "null" } ], "default": null, "description": "\nThe version (according to the DRIVER versioning scheme) of this location.\n" }, "landing_page_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "(From OpenAlex): The landing page URL for this location.", "title": "Landing Page Url" }, "pdf_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): A URL where you can find this location as a PDF.\n", "title": "Pdf Url" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "\n(From OpenAlex): The location's publishing license. This can be a Creative\nCommons license such as cc0 or cc-by, a publisher-specific license, or null\nwhich means we are not able to determine a license for this location.\n", "title": "License" }, "extra": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Any extra metadata about this location", "title": "Extra" } }, "title": "Location", "type": "object" }, "LocationEnhancement": { "description": "An enhancement which describes locations where this reference can be found.\n\nThis maps closely (almost exactly) to OpenAlex's locations.", "properties": { "enhancement_type": { "const": "location", "default": "location", "title": "Enhancement Type", "type": "string" }, "locations": { "description": "A list of locations where this reference can be found.", "items": { "$ref": "#/$defs/Location" }, "minItems": 1, "title": "Locations", "type": "array" } }, "required": [ "locations" ], "title": "LocationEnhancement", "type": "object" }, "OpenAlexIdentifier": { "description": "An external identifier representing an OpenAlex ID.", "properties": { "identifier": { "description": "The OpenAlex ID of the reference.", "pattern": "^W\\d+$", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "open_alex", "default": "open_alex", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "OpenAlexIdentifier", "type": "object" }, "OtherIdentifier": { "description": "An external identifier not otherwise defined by the repository.", "properties": { "identifier": { "description": "The identifier of the reference.", "title": "Identifier", "type": "string" }, "identifier_type": { "const": "other", "default": "other", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" }, "other_identifier_name": { "description": "The name of the undocumented identifier type.", "title": "Other Identifier Name", "type": "string" } }, "required": [ "identifier", "other_identifier_name" ], "title": "OtherIdentifier", "type": "object" }, "PubMedIdentifier": { "description": "An external identifier representing a PubMed ID.", "properties": { "identifier": { "description": "The PubMed ID of the reference.", "title": "Identifier", "type": "integer" }, "identifier_type": { "const": "pm_id", "default": "pm_id", "description": "The type of identifier used.", "title": "Identifier Type", "type": "string" } }, "required": [ "identifier" ], "title": "PubMedIdentifier", "type": "object" }, "ScoreAnnotation": { "description": "An annotation which represents the score for a label.\n\nThis is similar to a BooleanAnnotation, but lacks a boolean determination\nas to the application of the label.", "properties": { "annotation_type": { "const": "score", "default": "score", "title": "Annotation Type", "type": "string" }, "scheme": { "description": "An identifier for the scheme of annotation", "examples": [ "openalex:topic", "pubmed:mesh" ], "title": "Scheme", "type": "string" }, "label": { "description": "A high level label for this annotation like the name of the topic", "title": "Label", "type": "string" }, "score": { "description": "Score for this annotation", "title": "Score", "type": "number" }, "data": { "additionalProperties": true, "description": "An object representation of the annotation including any confidence scores or descriptions.", "title": "Data", "type": "object" } }, "required": [ "scheme", "label", "score" ], "title": "ScoreAnnotation", "type": "object" }, "Visibility": { "description": "The visibility of a data element in the repository.\n\nThis is used to manage whether information should be publicly available or\nrestricted (generally due to copyright constraints from publishers).", "enum": [ "public", "restricted", "hidden" ], "title": "Visibility", "type": "string" } } }
- field enhancements: list[EnhancementFileInput] | None = None[source]#
A list of enhancements for the reference
- field identifiers: list[Annotated[DOIIdentifier | PubMedIdentifier | OpenAlexIdentifier | OtherIdentifier, FieldInfo(annotation=NoneType, required=True, discriminator='identifier_type')]] | None = None[source]#
A list of ExternalIdentifiers for the Reference
- field visibility: Visibility = Visibility.PUBLIC[source]#
The level of visibility of the reference