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
Release history Release notifications | RSS feed
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.1.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for pubmed_xml-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0696985982fd69be5d078a1c86e295d3291adabe39818ec634658358046daf5 |
|
MD5 | 8b5a10a4abf3fc5f5a094d115461b15f |
|
BLAKE2b-256 | e81ba48c3d4c80bf8acba944d51c24846c92dbdee7f5582eda28217413c49c8f |