Skip to main content

gerritssh

https://badge.fury.io/py/gerritssh.png https://travis-ci.org/kdopen/gerritssh.png?branch=master https://coveralls.io/repos/kdopen/gerritssh/badge.png https://pypip.in/d/gerritssh/badge.png?version=latest

Python package wrapping the Gerrit command line API.

This is very much a work in progress, and intended to be the basis for building more sophisticated scripts and applications, for example automating complex work flows in large projects.

Rationale

This project was started as a test-bed for me to explore the wider world of Python, such as:

  • Unit testing

  • Continuous Integration

  • Sphinx rst documentation

  • tox, flake8, etc.

  • Supporting multiple versions of Python.

  • Pythonic style

Basically, everything that goes into making an industrial-strength Python library or application. So you are going to see novice mistakes and code which is not idiomatic.

All contributions and suggestions are welcome, and indeed that’s the logic behind making this open source. I want to learn from the experience of those who’ve been there before me.

Features

  • Handles the low-level details of the gerrit SSH command line syntax.

  • Makes the results of those commands available to the programmer in a format which is more natural for Python programmers to manipulate.

  • Is aware of which combinations of commands and versions are supported for versions of Gerrit from 2.4 through 2.8.

  • Supports Python 2.6, 2.7, 3.3, and 3.4

Planned Features

  • Support a broad range of commands including the latest commands for Gerrit v2.8 (such as ls-members)

  • Add a module to operate on sets of Review objects to perform more complex searches, such as building dependency graphs of open reviews.

  • Add support for the administrators gsql command

    • Implement queries such as examining the audit trail on group membership

    • Wrapping generation of properly quoted SQL statements

    • Extract the SCHEMA information with a \d command and dynamically clone the database into a memory-resident sqlite database.

  • Implement support for the stream-events command, serving up events using an observer-pattern approach to allow many threads to consume events.

Feedback

If you have any suggestions or questions about gerritssh feel free to email me at kderrick_public@att.net.

If you encounter any errors or problems with gerritssh, please let me know! Open an Issue at the GitHub http://github.com/kdopen/gerritssh main repository.

Documentation

The full documentation is at http://gerritssh.rtfd.org.

Release Notes

0.1.3 (2014-06-04)

  • Fixes #4 - Unit tests are not sufficient

    Added a baseline set of unit tests which perform end-to-end validation against a live Gerrit instance if GSSH_TEST_INSTANCE is set in the environment.

  • Corrects a bug found in the ssh client disconnect function by the new tests.

  • Adds new and extended make targets to better clean and test the package.

  • Updated documentation accordingly, including expanded testing information.

  • Removed pypi from the list of environments used on travis-ci.

    The tests all run fine under pypi locally, but something in travis’s pypi environment seems to be broken since they started supporting Python 3.4.

0.1.2 (2014-06-03)

  • Fixes #1 - gsshcli.py requires __version__ attribute

    Moved VERSION.py to inside the package so the metadata is avaialable to the package and its clients, then modified setup.py and conf.py to use execfile to read the data for their own purposes.

  • Fixes #2 - gsshcli.py query command fails when –limit option used

    The demo script now reconstitues all option arguments as strings.

  • Fixes #3 - Query command throws TypeError under Python2.7

    The JSON responses from the query command are correctly converted to strings in Python 2.x.

  • Initiates unit-test coverage reporting via coveralls.io

0.1.1 (2014-05-23)

  • Minor tweak for pip install

0.1.0 (2014-05-23)

  • First release on PyPI.

Metadata

Release files for gerritssh 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gerritssh 0.1.3
File Size Uploaded Provenance Actions
gerritssh-0.1.3.tar.gz 38.3 kB Without provenance Details for gerritssh-0.1.3.tar.gz

Release files / gerritssh-0.1.3.tar.gz

Download URL gerritssh-0.1.3.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f5a1b5f9cc04aaccaf0ad86e1a576e62d61c519b2d4278281ea6eccc92914e27
BLAKE2b-256 checksum
How to use checksums
b18dd7ebe0f3e7abf5bfab464a39effb4eac8babb0b8e025ab8380918f74aa88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for gerritssh 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page