Usage
Downloading and processing functions for PubMed.
- class AbstractText(*, text: str, label: str | None = None, category: str | None = None)[source]
Represents an abstract text object.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Article(*, pubmed: int, title: str, date_completed: date | None = None, date_revised: date | None = None, type_mesh_ids: list[str] = <factory>, headings: list[Heading] = <factory>, journal: Journal, journal_issue: JournalIssue, abstract: list[AbstractText] = <factory>, authors: list[Author | Collective] = <factory>, cites_pubmed_ids: list[str] = <factory>, xrefs: list[Reference] = <factory>, history: list[History] = <factory>, grants: list[Grant] = <factory>)[source]
Represents an article.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Journal(*, issn: str | None = None, nlm_catalog_id: str, issns: list[ISSN] = <factory>)[source]
Represents a reference to a journal.
Note, full information about a journal can be loaded elsewhere.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ensure_baselines(*, force: bool, source: Literal['remote', 'local'] | None = None) list[Path][source]
Ensure all the baseline files are downloaded.
- ensure_updates(*, force: bool, source: Literal['remote', 'local'] | None = None) list[Path][source]
Ensure all the baseline files are downloaded.
- iterate_ensure_articles(*, force: bool = False, source: Literal['remote', 'local'] | None = None) Iterable[Path][source]
Ensure articles from baseline, then updates.
- iterate_ensure_baselines(*, source: Literal['remote', 'local'] | None = None, force: bool = False) Iterable[Path][source]
Ensure all the baseline files are downloaded.
- iterate_ensure_updates(*, force: bool = False, source: Literal['remote', 'local'] | None = None) Iterable[Path][source]
Ensure all the baseline files are downloaded.
- iterate_process_articles(*, force_process: bool = False, ror_grounder: Grounder | None = None, mesh_grounder: Grounder | None = None, author_grounder: Grounder | None = None, multiprocessing: bool = False, force_listing: bool = False, source: Literal['remote', 'local'] | None = None, ground: bool = True) Iterable[Article][source]
Ensure and process articles from baseline, then updates.
- iterate_process_baselines(*, force_process: bool = False, multiprocessing: bool = False, ror_grounder: Grounder | None = None, mesh_grounder: Grounder | None = None, author_grounder: Grounder | None = None, force_listing: bool = False, source: Literal['remote', 'local'] | None = None) Iterable[Article][source]
Ensure and process all baseline files.
- iterate_process_updates(*, force_process: bool = False, multiprocessing: bool = False, ror_grounder: Grounder | None = None, mesh_grounder: Grounder | None = None, author_grounder: Grounder | None = None, force_listing: bool = False, source: Literal['remote', 'local'] | None = None) Iterable[Article][source]
Ensure and process updates.
- process_articles(*, force_process: bool = False, multiprocessing: bool = False, force_listing: bool = False, source: Literal['remote', 'local'] | None = None) list[Article][source]
Ensure and process articles from baseline, then updates.