Skip to main content

OpenReview API Python client library

Project description

OpenReview Python library

CircleCI Documentation Status CodeCov

Prerequisites

Python 3.9 or newer is required to use openreview-py.

Installation

There are two ways to install the OpenReview python library.

Using pip:

pip install openreview-py

From the repository:

git clone https://github.com/openreview/openreview-py.git
cd openreview-py
pip install -e .

Note: Depending on your Python installation you may need to use the command pip3 instead of pip.

Production / CI Installation

For reproducible deployments, install the package using the pinned lock file as constraints:

pip install -c requirements.txt .

For development (editable install with pinned dependencies):

pip install -c requirements.txt -e .

Updating Dependencies

This project uses pip-tools to manage dependency versions. pyproject.toml declares compatible version ranges, while requirements.txt (production) and requirements-dev.txt (test + docs) contain the exact pinned versions.

To update all dependencies to the latest compatible versions:

pip-compile pyproject.toml -o requirements.txt --strip-extras
pip-compile pyproject.toml --extra test --extra docs -o requirements-dev.txt --strip-extras

To update a single package:

pip-compile --upgrade-package requests pyproject.toml -o requirements.txt --strip-extras

Note: pip-compile resolves for the Python version of the running interpreter, so the numpy pin in the generated lock files will only match that version. After running pip-compile, manually replace the numpy line in both lock files with environment-marked entries:

numpy==2.0.2 ; python_version < '3.10'
numpy==2.2.6 ; python_version == '3.10'
numpy==2.4.3 ; python_version >= '3.11'

Usage

The openreview-py library can be used to easily access and modify any data stored in the OpenReview system.

For more information, see the official reference. You can also check the OpenReview docs for examples and How-To Guides

Test Setup

Running the openreview-py test suite requires some initial setup. First, the OpenReview API V1, OpenReview API V2 and OpenReview Web frontend must be cloned and configured to run on ports 3000, 3001 and 3030 respectively. For more information on how to install and configure those services see the README for each project:

Next, install the package with test dependencies:

pip install -e ".[test]"

Finally, you must download the proper Firefox Selenium driver for your OS from GitHub, and place the geckodriver executable in the directory openreview-py/tests/drivers. When you are done your folder structure should look like this:

├── openreview-py
│   ├── tests
│      ├── data
│      ├── drivers
│          └── geckodriver

Run Tests

Once the test setup above is complete you should be ready to run the test suite. To do so, start both OpenReview API versions running:

Inside the OpenReview API V1 directory

npm run cleanStart

Inside the OpenReview API V2 directory

npm run cleanStart

Inside the OpenReview Web directory

SUPER_USER=openreview.net npm run dev

Once all three services are running, start the tests:

pytest

Note: If you have previously set environment variables with your OpenReview credentials, make sure to clear them before running the tests: unset OPENREVIEW_USERNAME && unset OPENREVIEW_PASSWORD

To run a single set of tests from a file, you can include the file name as an argument. For example:

pytest tests/test_double_blind_conference.py

Project details


Release history Release notifications | RSS feed

This version

2.0.0

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

openreview_py-2.0.0-py3-none-any.whl (669.4 kB view details)

Uploaded Python 3

File details

Details for the file openreview_py-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: openreview_py-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 669.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openreview_py-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b13cdb1d0f61922ee1c8303dc80584e06c3d522597c1e638620c7a9a793ac934
MD5 642666e24d4bd0ce641508a6be091bf9
BLAKE2b-256 e9c6dfe0a2a547559b6946df42e1db9bfced93ae921afa16ee26ced225556e28

See more details on using hashes here.

Provenance

The following attestation bundles were made for openreview_py-2.0.0-py3-none-any.whl:

Publisher: publish-pypi.yml on openreview/openreview-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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