Skip to main content

Python library for access to PubMed -- fork from archived PyMed

Project description

NOTE: This is a user-maintained extension of the pymed project which was archived in 2020. Some bugs in pymed are fixed here. This package can be installed via pip install pymed-paperscraper since I forked it to support paperscraper.

License: MIT PyPI version Downloads Downloads

PyMed - PubMed Access through Python

PyMed is a Python library that provides access to PubMed through the PubMed API.

Why this library?

The PubMed API is not very well documented and querying it in a performant way is too complicated and time consuming for researchers. This wrapper provides access to the API in a consistent, readable and performant way.

Features

This library takes care of the following for you:

  • Querying the PubMed database (with the standard PubMed query language)
  • Batching of requests for better performance
  • Parsing and cleaning of the retrieved articles

Examples

For full (working) examples have a look at the examples/ folder in this repository. In essence you only need to import the PubMed class, instantiate it, and use it to query:

from pymed_paperscraper import PubMed
pubmed = PubMed(tool="MyTool", email="my@email.address")
results = pubmed.query("Some query", max_results=500)

Notes on the API

The original documentation of the PubMed API can be found here: PubMed Central. PubMed Central kindly requests you to:

  • Do not make concurrent requests, even at off-peak times; and
  • Include two parameters that help to identify your service or application to our servers
    • tool should be the name of the application, as a string value with no internal spaces, and
    • email should be the e-mail address of the maintainer of the tool, and should be a valid e-mail address.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymed_paperscraper-1.0.2.tar.gz (258.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymed_paperscraper-1.0.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pymed_paperscraper-1.0.2.tar.gz.

File metadata

  • Download URL: pymed_paperscraper-1.0.2.tar.gz
  • Upload date:
  • Size: 258.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pymed_paperscraper-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0b6e19c53c75df94aefc395db55da6ba9f8b9ad4298406c439fa5ace84545276
MD5 56996c4c2775bee8d2827eceea994e34
BLAKE2b-256 48df78c95a9b4f0855a85b11a3dd79463265e8d067ab7ffa090d672a61bae3ff

See more details on using hashes here.

File details

Details for the file pymed_paperscraper-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pymed_paperscraper-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 51ab792ed9bbea3999a17da061915ba92cab637f8f42a442cee608920dadb650
MD5 7859ec7e1da3fb41310dba9cc29aeff7
BLAKE2b-256 c35ae52f529f28597afe149a6e39a45bbd4e0f8dff74b1c48ee9b1c6229cd2b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page