See source on GitHub: https://github.com/culshoefer/pyarxiv
pyarxiv
pyarxiv is a wrapper for the API of Cornell University’s famous repository for scientific papers.
Supports Python 2.7, 3.3-3.6+
Installation
pip install pyarxiv
Features
Query the arXiv API (atom feed) in your code
Use enums for arXiv categories
Download papers in your code as PDF TODO - Do the above in the commandline
Usage
CLI
pyarxiv-cli download -h
pyarxiv-cli query -h
# will download a couple of papers with given ids to folder /home/user, name them according to their titles,
# append their arxiv ids, and do not give progress feedback when each paper is downloaded
pyarxiv-cli download 1703.00001 1703.00002v1 ... --target-folder=/home/user --use-title-for-filename --append-id --silent
# Queries for papers with "Lorem" in them, maximally gets 5 papers (default 100), authors Einstein and Zweistein
# Other potential arguments are --abstract, --journalref and manualmode with --querystring
pyarxiv-cli query --title="Lorem" --max-results=5 --authors="A Einstein, B Zweistein"
You can also chain commands:
pyarxiv-cli download $(pyarxiv-cli query --title="WaveNet") --use-title-for-filename --append-id
Python
from pyarxiv import query, download_entries
from pyarxiv.arxiv_categories import ArxivCategory, arxiv_category_map
#query(max_results=100, ids=[], categories=[],
# title='', authors='', abstract='', journal_ref='',
# querystring='')
entries = query(title='WaveNet')
titles = map(lambda x: x['title'], entries)
print(list(titles))
#download_entries(entries_or_ids_or_uris=[], target_folder='.',
# use_title_for_filename=False, append_id=False,
# progress_callback=(lambda x, y: id))
download_entries(entries)
entries_with_category = query([ArxivCategory.cs_AI])
print(arxiv_category_map(ArxivCategory.cs_AI))
Metadata
Release files for pyarxiv 1.0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyarxiv-1.0.3.1.tar.gz | 11.0 kB | Details |
Release files / pyarxiv-1.0.3.1.tar.gz
| Download URL | pyarxiv-1.0.3.1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51ab841b8e00c02d3c8612a035c89efec33305d2520200da335655d5494a0cde
|
|
BLAKE2b-256 checksum How to use checksums |
59e17f66ed8636f50d56b3b48f2f1bdaf312b9b37bab2eb147542ea1511e1960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |