Skip to main content

Pubmed XML Parser

Project description

PubMed XML Parser

Installation

python3 -m pip install pubmed_xml

Usage

CommandLine

pubmed_xml --help

# parse single
pubmed_xml 30003000

# parse batch
pubmed_xml 30003000,30003001,30003002

# parse multiple
pubmed_xml 30003000 30003001 30003002

# parse from xml file
pubmed_xml tests/pubmed22n1543.xml.gz -o out.jl

# save file
pubmed_xml 30003000,30003001,30003002 -o out.jl

Python

from pubmed_xml import Pubmed_XML_Parser

pubmed = Pubmed_XML_Parser()

for article in pubmed.parse('30003000,30003001,30003002'):
    print(article)        # Article<30003002>
    print(article.data)   # dict object
    print(article.to_json(indent=2))   # json string
    print(article.pmid, article.title, article.abstract) # by attribute
    print(article['pmid'], article['title'], article['abstract']) # by key

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

pubmed_xml-1.0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

pubmed_xml-1.0.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pubmed_xml-1.0.3.tar.gz.

File metadata

  • Download URL: pubmed_xml-1.0.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for pubmed_xml-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d494a163c693c4a1bd06a98096737cf7053504a0a06fa7ef48640a39692ac159
MD5 1b5b0926bb4532ecee64683cdc74e116
BLAKE2b-256 daf2c40c927f0689c1a426443b7b784c9d388a7f4347e52e51ac07cd59cfd3cd

See more details on using hashes here.

File details

Details for the file pubmed_xml-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pubmed_xml-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for pubmed_xml-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c5da61c76d37e54d0df2eccaf190c9ef06cdc470ec17813ea7b74bd5bbf09d2
MD5 594c7da238eada28965e7d0773aab400
BLAKE2b-256 497a58ff1087382818e6a3f339d74ab6c1fb166c2cf712893c03be16055dae8d

See more details on using hashes here.

Supported by

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