python-gerrit-api
Python wrapper for the Gerrit REST API.
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-apiuv
uv add python-gerrit-apipoetry
poetry add python-gerrit-apiInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
civisPython client library for programmatically…
permissive · top 15,000 on PyPI
git-reviewgit-review is a command-line tool that…
permissive · top 15,000 on PyPI
pygerrit2Pygerrit2 is a client library for interacting…
permissive · top 15,000 on PyPI
python-sonarqube-apiProvides a Python client library for…
agpl · top 15,000 on PyPI
requires.ioA command-line tool and Python API client for…
unclear · top 15,000 on PyPI
pysnykA Python client library for the Snyk API that…
permissive · top 15,000 on PyPI
py-jama-rest-clientA Python REST API client for Jama Connect that…
permissive · top 15,000 on PyPI
python-cinderclientPython bindings and command-line interface to…
permissive · top 15,000 on PyPI
qase-api-clientPython client library for the Qase TestOps API…
unclear · top 15,000 on PyPI
zammad_pyPython client library for the Zammad helpdesk…
permissive · top 15,000 on PyPI