Skip to main content

Git-Patchwork integration tool

Project description

PyPi Status Documentation Status Build Status

git-pw is a tool for integrating Git with Patchwork, the web-based patch tracking system.


The easiest way to install git-pw and its dependencies is using pip. To do so, run:

$ pip install git-pw

You can also install git-pw manually. First, install the required dependencies. On Fedora, run:

$ sudo dnf install python3-requests python3-click python3-pbr \
    python3-arrow python3-tabulate python3-yaml

On Ubuntu, run:

$ sudo apt-get install python3-requests python3-click python3-pbr \
    python3-arrow python3-tabulate python3-yaml

Once dependencies are installed, clone this repo and run

$ git clone
$ cd git-pw
$ pip install --user .  # or 'sudo python install'

Getting Started

To begin, you’ll need to configure Git settings appropriately. The following settings are required:


The URL for the Patchwork instance’s API. This should include the API version:

You can discover the API version supported by your instance by comparing the server version, found at /about, with the API versions provided in the documentation. For example, if your server is running Patchwork version 3.0.x, you should use API version 1.2.


The project name or list-id. This will appear in the URL when using the web UI:{project_name}/list/

For read-write access, you also need authentication - you can use either API tokens or a username/password combination:


The API token for your Patchwork account.


The username for your Patchwork account.


The password for your Patchwork account.

If only read-only access is desired, credentials can be omitted.

The following settings are optional and may need to be set depending on your Patchwork instance’s configuration:


The states that can be applied to a patch using the git pw patch update command. Should be provided in slug form (changes-requested instead of Changes Requested). Only required if your Patchwork instance uses non-default states.

You can set these settings using the git config command. This should be done in the repo in which you intend to apply patches. For example, to configure the Patchwork project, run:

$ git config pw.server ''
$ git config pw.project 'patchwork'


If you’re interested in contributing to git-pw, first clone the repo:

$ git clone
$ cd git-pw

Create a virtualenv, then install the package in editable mode:

$ virtualenv .venv
$ source .venv/bin/activate
$ pip install --editable .


Documentation is available on Read the Docs

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

git-pw-2.3.0.tar.gz (43.9 kB view hashes)

Uploaded source

Built Distribution

git_pw-2.3.0-py3-none-any.whl (21.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page