Skip to main content

XML parser for PubMed Central (PMC) Database

Project description

XML parser for PubMed Central (PMC) Database

Installation

python3 -m pip install pmc_xml

Usage

CommandLine

pmc_xml --help

# parse single
pmc_xml PMC6039336

# parse batch
pmc_xml PMC6039336,PMC6031859,PMC6031856

# parse multiple
pmc_xml PMC6039336 PMC6031859 PMC6031856

# save file
pmc_xml PMC6039336,PMC6031859,PMC6031856 -o out.jl

Python

from pmc_xml import PMC_XML_Parser

pmc = PMC_XML_Parser()

for article in pmc.parse('PMC6039336,PMC6031859,PMC6031856'):
    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

pmc_xml-1.0.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

pmc_xml-1.0.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pmc_xml-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4b929e3b5a558129a4ef220613738241d58f3d05a87fa19d0ad068bcb23ab12d
MD5 7c25788d7b4da19f73ee01371dbb5c54
BLAKE2b-256 13b7217658490b78ca274c6892b223a3a30a2a744496d42acedb210f5e974471

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pmc_xml-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pmc_xml-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e5ad599f7f795477897cf352a8ad1f92b6efb7d07a00142b08b80b360c7be94
MD5 93768f68461654598416ea6f20d964f1
BLAKE2b-256 84032ebaeadca388cf0b11ed95db23f89cd80f8a08a7dd02e733cb672abe9005

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