gerrit package

Subpackages

Submodules

gerrit.base module

class gerrit.base.GerritClient(base_url: str, username: str | None = None, password: str | None = None, use_netrc: bool = False, ssl_verify: bool | str = True, cert: str | Tuple[str, str] | None = None, cookies: Dict[str, str] | None = None, cookie_jar: Any | None = None, timeout: int = 60, max_retries: int | None = None, session: Session | None = None, auth_suffix: str = '/a')[source]

Bases: object

Python wrapper for the Gerrit V3.x REST API.

property access: Any

Access related REST APIs

Returns:

property accounts: Any

Account related REST APIs

Returns:

property changes: Any

Change related REST APIs

Returns:

property config: Any

Config related REST APIs

Returns:

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

Send HTTP DELETE to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get(endpoint: str, **kwargs: Any) Any[source]

Send HTTP GET to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get_endpoint_url(endpoint: str) str[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() str[source]

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

property groups: Any

Group related REST APIs

Returns:

property plugins: Any

Plugin related REST APIs

Returns:

post(endpoint: str, **kwargs: Any) Any[source]

Send HTTP POST to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property projects: Any

Project related REST APIs :return:

put(endpoint: str, **kwargs: Any) Any[source]

Send HTTP PUT to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property server: Any

get the information about the Gerrit server configuration.

Returns:

property version: str

get the version of the Gerrit server.

Returns:

Module contents

class gerrit.GerritClient(base_url: str, username: str | None = None, password: str | None = None, use_netrc: bool = False, ssl_verify: bool | str = True, cert: str | Tuple[str, str] | None = None, cookies: Dict[str, str] | None = None, cookie_jar: Any | None = None, timeout: int = 60, max_retries: int | None = None, session: Session | None = None, auth_suffix: str = '/a')[source]

Bases: object

Python wrapper for the Gerrit V3.x REST API.

property access: Any

Access related REST APIs

Returns:

property accounts: Any

Account related REST APIs

Returns:

property changes: Any

Change related REST APIs

Returns:

property config: Any

Config related REST APIs

Returns:

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

Send HTTP DELETE to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get(endpoint: str, **kwargs: Any) Any[source]

Send HTTP GET to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

get_endpoint_url(endpoint: str) str[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() str[source]

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

property groups: Any

Group related REST APIs

Returns:

property plugins: Any

Plugin related REST APIs

Returns:

post(endpoint: str, **kwargs: Any) Any[source]

Send HTTP POST to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property projects: Any

Project related REST APIs :return:

put(endpoint: str, **kwargs: Any) Any[source]

Send HTTP PUT to the endpoint.

Parameters:

endpoint – The endpoint to send to.

Returns:

property server: Any

get the information about the Gerrit server configuration.

Returns:

property version: str

get the version of the Gerrit server.

Returns: