Skip to main content

A Python package for retrieving arXiv papers and filter them out with respect to some specific regex pattern.

Project description

CI Coverage License: MIT

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. 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:

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

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 . --check

Manually fix anything Ruff cannot handle automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrxiv-0.0.1.tar.gz (13.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrxiv-0.0.1-py3-none-any.whl (13.3 MB view details)

Uploaded Python 3

File details

Details for the file pyrxiv-0.0.1.tar.gz.

File metadata

  • Download URL: pyrxiv-0.0.1.tar.gz
  • Upload date:
  • Size: 13.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyrxiv-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7fdba71874072b93080d66050ff8d01f28163bb25c66a135e32da3b58a494a45
MD5 a89410b8692bf15e7ffcde56996317bf
BLAKE2b-256 f12e2fe06ece8532cbe6e0071609751646d033c42654a569e38c082ec0ec7a42

See more details on using hashes here.

File details

Details for the file pyrxiv-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyrxiv-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyrxiv-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a2e2f8b704c8dbc7b2adcc28dc4959e596c917f6d0458e4bac9c91089c890db
MD5 436b8a69a61c1f5fccfb3e343a338113
BLAKE2b-256 012f6ad1523b321460ad45f0e1421b53d48f21845639cdff2df1f78d9f3720ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page