Skip to main content

CI Coverage License: MIT PyPI version Python versions

pyrxiv

pyrxiv is a Python package for retrieving arXiv papers, storing their metadata in pydantic-like classes, and optionally filtering some of them out based on the specific content of the papers (matching a regex pattern).

While originally developed for the Strongly Correlated Electron Systems community in Condensed Matter Physics (cond-mat.str-el), it's designed to be flexible and applicable to any arXiv category.

Install the core package:

pip install pyrxiv

Objective

pyrxiv main objective is to provide an easy command line interface (CLI) to search and download arXiv papers which contain a specific content string matched against a regex pattern. By default, the arXiv PDFs are downloaded. You can optionally save metadata to HDF5 files. You can use the CLI and print the options after installing the package using:

pyrxiv --help

or directly:

pyrxiv search_and_download --help

For example, to download PDFs:

pyrxiv search_and_download --category cond-mat.str-el --regex-pattern "DMFT|Hubbard" --n-papers 5

Or to also save metadata to HDF5 files:

pyrxiv search_and_download --category cond-mat.str-el --regex-pattern "DMFT|Hubbard" --n-papers 5 --save-hdf5

Note: When using --regex-pattern, the tool will continue fetching papers from arXiv until it finds the specified number of papers (--n-papers) that match the pattern. Papers that don't match the regex are automatically discarded.

Documentation

For a comprehensive guide on how to use the CLI and recommended pipelines, see the How to Use pyrxiv documentation.


Development

To contribute to pyrxiv or run it locally, follow these steps:

Clone the Repository

git clone https://github.com/JosePizarro3/pyrxiv.git
cd pyrxiv

Set Up a Virtual Environment

We recommend Python ≥ 3.10:

python3 -m venv .venv
source .venv/bin/activate

Install Dependencies

Use uv (faster than pip) to install the package in editable mode with dev extras:

pip install --upgrade pip
pip install uv
uv pip install -e .[dev]

Run tests

Use pytest with verbosity to run all tests:

python -m pytest -sv tests

To check code coverage:

python -m pytest --cov=pyrxiv tests

Code formatting and linting

We use Ruff for formatting and linting (configured via pyproject.toml).

Check linting issues:

ruff check .

Auto-format code:

ruff format .

Manually fix anything Ruff cannot handle automatically.

Metadata

Release files for pyrxiv 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrxiv 1.0.2
File Size Uploaded Provenance Actions
pyrxiv-1.0.2.tar.gz 13.4 MB Without provenance Details for pyrxiv-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrxiv 1.0.2
File Interpreter ABI Platform Actions
pyrxiv-1.0.2-py3-none-any.whl Python 3 none any Details for pyrxiv-1.0.2-py3-none-any.whl

Total release size: 26.7 MB

Release files / pyrxiv-1.0.2.tar.gz

Download URL pyrxiv-1.0.2.tar.gz
Size 13.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7d4051b6905f7b3ed29f4c6ed4ae4252f9331ddbb512bee92f3889fab5b12009
BLAKE2b-256 checksum
How to use checksums
e39d66ef57a10e275f3d5e404513b0442dbf632e906e4b0a2b0f4898ecc4ffd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pyrxiv-1.0.2-py3-none-any.whl

Download URL pyrxiv-1.0.2-py3-none-any.whl
Size 13.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d117802a3e51db9168b84c6e4dac767225b814d9a025fa36621be9ede9b11366
BLAKE2b-256 checksum
How to use checksums
409e1f5524322448d11450f5125b5f8270b61925f1c651627b8b5ee94def8b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for pyrxiv 1.0.2

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