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.1.tar.gz (7.0 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.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pmc_xml-1.0.1.tar.gz
  • Upload date:
  • Size: 7.0 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.1.tar.gz
Algorithm Hash digest
SHA256 20a9dceac0a260cf6b2cb72ab82166f9ca779171c3de836a7f2f1a779937a678
MD5 6c062c6e95cc69e9c13fc6b9844ba33f
BLAKE2b-256 689a9aa58d730030dc225bc49b364f5eaf8ff33f49a8771783bb8a484fd758eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pmc_xml-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20086435dffdb12ffdf6dda6382bc76bf827869093264f1ba7309a3d9c5386e9
MD5 4693da3664cc8760d2fd014a968ed332
BLAKE2b-256 e912ec89e2882b8d574a983ffaa5bd231c36224b17c0e24a77dfb5d754ac1156

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