You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pmc-xml

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pmc-xml

XML parser for PubMed Central (PMC) Database

1.0.1
pipPyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts