Skip to main content

See source on GitHub: https://github.com/culshoefer/pyarxiv

buildstatusCoverage Status

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)

Source distribution for pyarxiv 1.0.3.1
File Size Uploaded Provenance Actions
pyarxiv-1.0.3.1.tar.gz 11.0 kB Without provenance Details for pyarxiv-1.0.3.1.tar.gz

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

Security for pyarxiv 1.0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page