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-0.0.1.tar.gz (258.3 kB view details)

Uploaded Source

Built Distribution

pymed_paperscraper-0.0.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymed_paperscraper-0.0.1.tar.gz
  • Upload date:
  • Size: 258.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for pymed_paperscraper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cf731d82afd7332f7c911d155eb0fe439358a1584a452981bcfcbd15805084e4
MD5 f12787883f5be57c5f470309e5311e9e
BLAKE2b-256 6e208d1237b11a923c6cbf187d4aab60a4a0c1f90b1cab9f2708fc831a63132b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pymed_paperscraper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbca0aeb38886d89db5104f1ebf3560e16a53d05fb6621011acc3e74f4c8801
MD5 215ed08d39a4342f2d92d91cb26a302a
BLAKE2b-256 73a68e9df8cd241b9265df5374a2d55c0829205bf817ddbe1dc85a3c6c20e68a

See more details on using hashes here.

Provenance

Supported by

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