pyEuropePMC

PyEuropePMC

A comprehensive Python toolkit for searching, retrieving, and analyzing biomedical literature from Europe PMC.

Overview

PyEuropePMC provides a powerful, type-safe interface to the Europe PMC database, offering advanced search capabilities, full-text content retrieval, XML parsing, and analytics tools for biomedical research.

Key Capabilities

Quick Start

Installation

pip install pyeuropepmc

Basic Usage

from pyeuropepmc.clients.search import SearchClient

with SearchClient() as client:
    results = client.search("CRISPR gene editing", limit=10)
    for paper in results:
        print(f"{paper['title']} ({paper['pubYear']})")

Query Builder

from pyeuropepmc.query import QueryBuilder

query = (
    QueryBuilder()
    .keyword("CRISPR")
    .and_()
    .date_range("2020-01-01", "2024-12-31")
    .and_()
    .has_full_text()
    .and_()
    .open_access()
)

with SearchClient() as client:
    results = client.search(str(query), limit=50)

Full-Text Download

from pyeuropepmc.clients.fulltext import FullTextClient

with FullTextClient() as client:
    content = client.get_fulltext("PMC7512345")
    if content.xml:
        print(content.xml[:500])

Documentation Structure

Section Description
Getting Started Installation, quick start, and FAQ
Features Search, full-text, parsing, and caching
API Reference Complete method documentation
Guides Enrichment and integration guides
Advanced Caching, performance, and power features
Reference Data models and RDF mapping
Development Contributing and development setup
Examples Working code samples

Requirements

License

MIT License