Skip to content

JonasHeinickeBio/pyEuropePMC

Repository files navigation

PyEuropePMC

Python 3.10+ License: MIT Tests Coverage

PyEuropePMC is a robust Python toolkit for automated search, extraction, and analysis of scientific literature from Europe PMC.

✨ Key Features

  • 🔍 Comprehensive Search API - Query Europe PMC with advanced search options
  • 📊 Multiple Output Formats - JSON, XML, and Dublin Core support
  • 🔄 Smart Pagination - Automatic handling of large result sets
  • 🛡️ Robust Error Handling - Built-in retry logic and connection management
  • Rate Limiting - Respectful API usage with configurable delays
  • 🧪 Extensively Tested - 174 tests with 90%+ code coverage

🚀 Quick Start

Installation

pip install pyeuropepmc

Basic Usage

from pyeuropepmc.search import SearchClient

# Search for papers
with SearchClient() as client:
    results = client.search("CRISPR gene editing", pageSize=10)

    for paper in results["resultList"]["result"]:
        print(f"Title: {paper['title']}")
        print(f"Authors: {paper.get('authorString', 'N/A')}")
        print("---")

Advanced Search with Parsing

# Search and automatically parse results
papers = client.search_and_parse(
    query="COVID-19 AND vaccine",
    pageSize=50,
    sort="CITED desc"
)

for paper in papers:
    print(f"Citations: {paper.get('citedByCount', 0)}")
    print(f"Title: {paper.get('title', 'N/A')}")

📚 Documentation

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

📄 License

Distributed under the MIT License. See LICENSE for more information.

🌐 Links

About

Python Wrapper Class for Europe PMC API to search and retrieve scientfic literature

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •