aoptk.literature.databases.pubmed

Exceptions

QueryTooLargeError

Exception raised when query returns more than maximum_results.

Classes

PubMed

Class to get data from PubMed based on a query.

Module Contents

exception aoptk.literature.databases.pubmed.QueryTooLargeError(count: int, maximum: int)[source]

Bases: Exception

Exception raised when query returns more than maximum_results.

count[source]
maximum[source]
class aoptk.literature.databases.pubmed.PubMed(query: str)[source]

Bases: aoptk.literature.get_abstract.GetAbstract, aoptk.literature.get_id.GetID, aoptk.literature.get_publication_metadata.GetPublicationMetadata

Class to get data from PubMed based on a query.

maximum_results = 10000[source]
batch_size = 200[source]
max_retries = 5[source]
_query[source]
id_list[source]
publication_count[source]
get_abstracts() list[aoptk.literature.abstract.Abstract][source]

Retrieve Abstracts based on the query.

get_publications_metadata() list[aoptk.literature.publication_metadata.PublicationMetadata][source]

Retrieve Publication metadata based on the query.

get_publication_count() int[source]

Return the number of publications matching the query in PubMed.

get_ids() list[aoptk.literature.id.ID][source]

Get a list of PubMed IDs from PubMed based on the query.

_get_abstract(pmid: str) aoptk.literature.abstract.Abstract[source]

Get the abstract for a given PubMed ID.

_get_publication_metadata(pmid: str) aoptk.literature.publication_metadata.PublicationMetadata[source]

Get the publication metadata for a given PubMed ID.