openreview-py

openreviewMIT活跃维护

OpenReview 官方 Python 客户端,封装了 OpenReview API,方便研究者用代码提交论文、管理评审和批量拉取会议数据。

Official Python client library for the OpenReview API

v2.9.2发布于 2026-11-05 21:15 UTC273star43fork同步于 2026-11-11 00:01 UTC

怎么上手

由 README 提炼,执行前请确认
pip install openreview-py
硬件要求按 README 说明

README 未说明,仅要求 Python 3.9 或更高版本

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

OpenReview 官方 Python 客户端库,用来读写 OpenReview 平台上的论文评审与会议数据

OpenReview 官方 Python 客户端,封装了 OpenReview API,方便研究者用代码提交论文、管理评审和批量拉取会议数据。

核心能力

  • 封装 OpenReview API,访问和修改平台存储的数据
  • 提供官方文档与 How-To 示例,便于快速上手
  • 支持用 pip 安装,也可从仓库以可编辑模式安装
  • 提供 Docker Compose 集成测试环境,一键起停依赖服务

容易踩的坑

需要 Python 3.9 及以上版本,低版本无法安装;本地跑集成测试需先克隆 openreview-api、openreview-api-v1、openreview-web 三个同级仓库并配置 docker/config.json;不用 Docker 时需自行启动 API V1、API V2 和 Web 前端,分别占用 3000、3001、3030 端口,并下载 geckodriver 放入 tests/drivers

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.9.2
  1. v2.9.2最新正式版2026-11-05 · 2026-11-05 21:15 UTC

    What's Changed

    Full Changelog: https://github.com/openreview/openreview-py/compare/v2.9.1...v2.9.2

  2. v2.9.12026-10-21 · 2026-10-21 17:10 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/openreview/openreview-py/compare/v2.9.0...v2.9.1

  3. v2.9.02026-10-15 · 2026-10-15 16:59 UTC
    查看更新说明

    Features

    Fixes

    New Contributors

    Full Changelog: https://github.com/openreview/openreview-py/compare/v2.8.0...v2.9.0

  4. v2.8.02026-10-07 · 2026-10-07 14:44 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/openreview/openreview-py/compare/v2.7.1...v2.8.0

  5. v2.7.12026-10-05 · 2026-10-05 18:42 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/openreview/openreview-py/compare/v2.7.0...v2.7.1

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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

    Run Tests with Docker (Recommended)

    The easiest way to run the integration tests is with Docker Compose. This requires Docker and that the following sibling repositories are cloned next to openreview-py:

    ├── openreview-api        # https://github.com/openreview/openreview-api
    ├── openreview-api-v1     # https://github.com/openreview/openreview-api-v1
    ├── openreview-web        # https://github.com/openreview/openreview-web
    └── openreview-py         # this repo
    

    Set up your config file, then run tests:

    cd docker
    cp config.example.json config.json
    # Edit config.json with your repo paths (required before first run)
    
    # Run a specific test file (services start, tests run, then everything tears down)
    ./run.py tests/test_client.py
    
    # Run a specific test with verbose output
    ./run.py tests/test_client.py::TestClient::test_get_groups -v
    
    # Run all tests (takes a long time)
    ./run.py
    

    Each test run starts infrastructure (MongoDB, Redis, Elasticsearch, web), restarts API servers with a clean database via npm run cleanStart, runs the tests, and tears down all services when done (unless keep_infra is enabled). All services share a network namespace so localhost works everywhere, reusing the same circleci.json configs used in CI.

    Serve Mode (Manual Browser Testing)

    Start all services with ports exposed to your host machine for manual browser testing:

    # Start services only (browse http://localhost:3030)
    ./run.py --serve
    
    # Populate the database by running a test, then keep services running
    ./run.py --serve tests/test_icml_conference.py
    
    # Preserve existing data across restarts (skip cleanStart)
    ./run.py --serve --no-clean
    

    Press Ctrl+C to stop. If keep_infra is enabled, only API servers are stopped and infrastructure stays running. Otherwise, all services are torn down. You can also run docker compose down from another terminal to stop everything.

    Combine with --shell to get an interactive shell while services are running:

    # Serve with shell access (browse + run scripts/tests)
    ./run.py --serve --shell
    
    # Populate DB, then drop into shell for manual testing
    ./run.py --serve --shell tests/test_icml_conference.py
    

    Interactive Shell

    Drop into the test container shell for debugging or manual pytest runs:

    ./run.py --shell
    

    Branch Selection

    Use specific branches for sibling repos:

    # Override branches via CLI
    ./run.py --branch-api-v2 feature/new-endpoint tests/test_client.py
    
    # Or configure defaults in docker/config.json (copy from config.example.json)
    cp config.example.json config.json
    # Edit config.json with your paths and branches
    

    Keeping Infrastructure Between Runs

    Use --keep-infra (or set keep_infra: true in config) to keep MongoDB, Redis, Elasticsearch, and web running after tests. Then use --no-clean on the next run to preserve the database:

    # First run: populate data, keep infrastructure running after tests
    ./run.py --keep-infra tests/test_registration_step.py
    
    # Second run: reuse infrastructure and database (skips cleanStart)
    ./run.py --serve --no-clean
    
    # Or combine: populate, then browse with shell access
    ./run.py --keep-infra tests/test_registration_step.py
    ./run.py --serve --shell --no-clean
    

    Note: --no-clean requires keep_infra to be used. Without it, the database is lost when services are torn down.

    Configuration

    Copy docker/config.example.json to docker/config.json before your first run. The config file is required and gitignored.

    {
      "api_v1": { "path": "../../openreview-api-v1", "branch": "main" },
      "api_v2": { "path": "../../openreview-api",    "branch": "feature/x" },
      "web":    { "path": "../../openreview-web",     "branch": "" },
      "mode": "test",
      "auto_checkout": true,
      "keep_infra": false
    }
    
    • path: Relative to docker/ or absolute. Defaults to sibling directories.
    • branch: Branch to auto-checkout before starting. Empty means use whatever is checked out.
    • mode: Default mode (test, serve). CLI flags override this.
    • auto_checkout: Set to false to disable auto-checkout. --no-checkout also disables it.
    • keep_infra: Set to true to keep infrastructure (mongo, redis, ES, web) running after tests. API servers are always torn down in test mode. --keep-infra also enables it.

    Cleanup

    # Remove containers (keep volumes for faster next run)
    docker compose down
    
    # Full clean (remove volumes too)
    docker compose down -v
    

    Note: The first run takes several minutes to pull images and install dependencies. Subsequent runs are much faster thanks to cached named volumes for node_modules and Python virtual environments.

    Run Tests Locally

    To run tests without Docker, you need to manually start the required services.

    Test Setup

    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:

    Install the package with test dependencies:

    pip install -e ".[test]"
    

    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
    

    Running Tests

    Start both OpenReview API versions and the web frontend:

    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_client.py