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 details)
Built Distribution
File details
Details for the file pubmed_xml-1.0.1.tar.gz
.
File metadata
- Download URL: pubmed_xml-1.0.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2377dff4827f37e5312b6b7b4e47dd02b1003cc70ad13d2129d449b93dbee06e |
|
MD5 | a1b946a99d1f4e6f688092598437694c |
|
BLAKE2b-256 | d7eda551bf88a7c32b1e3becd178c7ac213935c67547d5330382688a61c22886 |
File details
Details for the file pubmed_xml-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pubmed_xml-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0696985982fd69be5d078a1c86e295d3291adabe39818ec634658358046daf5 |
|
MD5 | 8b5a10a4abf3fc5f5a094d115461b15f |
|
BLAKE2b-256 | e81ba48c3d4c80bf8acba944d51c24846c92dbdee7f5582eda28217413c49c8f |