skillfed

python-gerrit-api

Python wrapper for the Gerrit REST API.

python-gerrit-api v3.1.0 408.5K downloads/30d#6,880 on PyPI2
Permissive license MIT Active released

What it is and what it does

python-gerrit-api is a Python wrapper around the Gerrit Code Review REST API that lets you automate common Gerrit operations programmatically. It abstracts the HTTP layer behind a client object with methods for managing projects, changes, accounts, groups, branches, and tags—operations that would otherwise require direct REST calls. The library depends only on requests and supports Python 3.6 through 3.12.

You instantiate a GerritClient with your Gerrit server URL and credentials, then call methods like client.projects.get(), client.changes.get(), or client.accounts.get() to retrieve and manipulate Gerrit entities. The library handles the endpoint routing and JSON serialization, making it practical for CI/CD pipelines, automation scripts, and tools that need to integrate with Gerrit without writing raw HTTP code.

Use it for:

  • Automate project creation, configuration, and branch management in Gerrit from deployment or infrastructure scripts.
  • Query and update changes programmatically—mark as reviewed, add hashtags, rebase, or submit—from CI/CD workflows.
  • Manage Gerrit accounts and groups in bulk, set SSH keys, or sync user metadata from external systems.
  • Build custom dashboards or reporting tools that pull change and project metadata from Gerrit.
  • Integrate Gerrit operations into Python-based automation frameworks or bots that need to interact with code review state.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python client library for interacting with Gerrit Code Review via its REST API, wrapping common operations on projects, changes, accounts, and groups.

Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and depends only on requests. It covers a broad surface of Gerrit operations and is stable enough for production use. Install it if you need to automate Gerrit workflows from Python.

Install

python-gerrit-api on PyPI

pip

pip install python-gerrit-api

uv

uv add python-gerrit-api

poetry

poetry add python-gerrit-api

Installing python-gerrit-api

Before you install

Low install friction with a single dependency on requests. Actively maintained as of 2026-07-20 with recent releases. Marked Production/Stable.

License in practice

MIT license (permissive) allows commercial and private use with minimal restrictions—attribution required but no copyleft obligations.

Quickstart

pip install python-gerrit-api

from gerrit import GerritClient
client = GerritClient(base_url="https://yourgerrit", username='user', password='pass')
project = client.projects.get('MyProject')

Verify before relying

  • Whether all documented Python versions (3.6–3.12) are actively tested in CI/CD
  • Performance characteristics when handling large numbers of changes or accounts
  • Whether OAuth token authentication is fully supported as an alternative to username/password

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance actively maintained — 153 days since the last release
Last repo commit
First released
Downloads 408,479/month — #6,880 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_gerrit_api-3.1.0-py3-none-any.whl

Keywords: api, gerrit, client, wrapper

Development Status :: 5 - Production/StableEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

Tags

gerrit rest api clientgerrit code review automationgerrit python wrappergerrit project managementgerrit change operationsgerrit account managementgerrit api integration
code-reviewrest-api-clientgerrit

More Software Development packages