gerrit package

Subpackages

Submodules

gerrit.base module

class gerrit.base.GerritClient(base_url, username=None, password=None, use_netrc=False, ssl_verify=True, cert=None, timeout=60, max_retries=None, auth_suffix='/a')[source]

Bases: object

Python wrapper for the Gerrit V3.x REST API.

property accounts

Account related REST APIs

Returns:

property changes

Change related REST APIs

Returns:

property config

Config related REST APIs

Returns:

default_headers = {'Content-Type': 'application/json; charset=UTF-8'}
delete(endpoint)[source]

Send HTTP DELETE to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get(endpoint, **kwargs)[source]

Send HTTP GET to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get_endpoint_url(endpoint)[source]

Return the complete url including host and port for a given endpoint. :param endpoint: service endpoint as str :return: complete url (including host and port) as str

get_password_from_netrc_file()[source]

Providing the password form .netrc file for getting Host name. :return: The related password from .netrc file as a string.

property groups

Group related REST APIs

Returns:

property plugins

Plugin related REST APIs

Returns:

post(endpoint, **kwargs)[source]

Send HTTP POST to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property projects

Project related REST APIs :return:

put(endpoint, **kwargs)[source]

Send HTTP PUT to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property server

get the information about the Gerrit server configuration.

Returns:

property version

get the version of the Gerrit server.

Returns:

Module contents