Table of Contents
gitlab package)gitlab command)gitlab package)¶Wrapper for the GitLab API.
Bases:object
Represents a GitLab server connection.
url (Optional[str]) – The URL of the GitLab server (defaults tohttps://gitlab.com).
private_token (Optional[str]) – The user private token
oauth_token (Optional[str]) – An oauth token
job_token (Optional[str]) – A CI job token
ssl_verify (Union[bool,str]) – Whether SSL certificates should be validated. Ifthe value is a string, it is the path to a CA file used forcertificate validation.
timeout (Optional[float]) – Timeout to use for requests to the GitLab server.
http_username (Optional[str]) – Username for HTTP authentication
http_password (Optional[str]) – Password for HTTP authentication
api_version (str) – Gitlab API version to use (support for 4 only)
pagination (Optional[str]) – Can be set to ‘keyset’ to use keyset pagination
order_by (Optional[str]) – Set order_by globally
user_agent (str) – A custom user agent to use for making HTTP requests.
retry_transient_errors (bool) – Whether to retry after 500, 502, 503, or504 responses. Defaults to False.
session (Optional[requests.sessions.Session]) –
per_page (Optional[int]) –
None
The computed API base URL.
The API version used (4 only).
Performs an authentication using private token.
Theuser attribute will hold agitlab.objects.CurrentUser object onsuccess.
None
None
SeeEventManager
Create a Gitlab connection from configuration files.
gitlab_id (Optional[str]) – ID of the configuration section.
list[str] (config_files) – List of paths to configuration files.
config_files (Optional[List[str]]) –
A Gitlab connection.
gitlab.config.GitlabDataError – If the configuration is not correct.
Retrieve information about the current license.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
The current license information
Dict[str, Any]
SeeGroupManager
Headers that will be used in request to GitLab
SeeHookManager
Make a DELETE request to the Gitlab server.
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projecs’)
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The requests object.
GitlabHttpError – When the return code is not 2xx
requests.models.Response
Make a GET request to the Gitlab server.
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projecs’)
query_data (Optional[Dict[str,Any]]) – Data to send as query parameters
streamed (bool) – Whether the data should be streamed
raw (bool) – If True do not try to parse the output as json
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
A requests result object is streamed is True or the content type isnot json.The parsed json data otherwise.
GitlabHttpError – When the return code is not 2xx
GitlabParsingError – If the json data could not be parsed
Union[Dict[str, Any], requests.models.Response]
Make a GET request to the Gitlab server for list-oriented queries.
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projects’)
query_data (Optional[Dict[str,Any]]) – Data to send as query parameters
**kwargs – Extra options to send to the server (e.g. sudo, page,per_page)
as_list (Optional[bool]) –
kwargs (Any) –
A list of the objects returned by the server. Ifas_list isFalse and no pagination-related arguments (page,per_page,all) are defined then a GitlabList object (generator) is returnedinstead. This object will make API calls when needed to fetch thenext items from the server.
GitlabHttpError – When the return code is not 2xx
GitlabParsingError – If the json data could not be parsed
Union[gitlab.client.GitlabList, List[Dict[str, Any]]]
Make a POST request to the Gitlab server.
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projecs’)
query_data (Optional[Dict[str,Any]]) – Data to send as query parameters
post_data (Optional[Dict[str,Any]]) – Data to send in the body (will be converted tojson by default)
raw (bool) – If True, do not convert post_data to json
files (Optional[Dict[str,Any]]) – The files to send to the server
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The parsed json returned by the server if json is return, else theraw content
GitlabHttpError – When the return code is not 2xx
GitlabParsingError – If the json data could not be parsed
Union[Dict[str, Any], requests.models.Response]
Make a PUT request to the Gitlab server.
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projecs’)
query_data (Optional[Dict[str,Any]]) – Data to send as query parameters
post_data (Optional[Union[Dict[str,Any],bytes]]) – Data to send in the body (will be converted tojson by default)
raw (bool) – If True, do not convert post_data to json
files (Optional[Dict[str,Any]]) – The files to send to the server
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The parsed json returned by the server.
GitlabHttpError – When the return code is not 2xx
GitlabParsingError – If the json data could not be parsed
Union[Dict[str, Any], requests.models.Response]
Make an HTTP request to the Gitlab server.
verb (str) – The HTTP method to call (‘get’, ‘post’, ‘put’, ‘delete’)
path (str) – Path or full URL to query (‘/projects’ or‘http://whatever/v4/api/projecs’)
query_data (Optional[Dict[str,Any]]) – Data to send as query parameters
post_data (Optional[Union[Dict[str,Any],bytes]]) – Data to send in the body (will be converted tojson by default)
raw (bool) – If True, do not convert post_data to json
streamed (bool) – Whether the data should be streamed
files (Optional[Dict[str,Any]]) – The files to send to the server
timeout (Optional[float]) – The timeout, in seconds, for the request
obey_rate_limit (bool) – Whether to obey 429 Too Many Requestresponses. Defaults to True.
max_retries (int) – Max retries after 429 or transient errors,set to -1 to retry forever. Defaults to 10.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
A requests result object.
GitlabHttpError – When the return code is not 2xx
requests.models.Response
SeeIssueManager
SeeKeyManager
Validate a gitlab CI configuration.
content (str) – The .gitlab-ci.yml content
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabVerifyError – If the validation could not be done
(True, []) if the file is valid, (False, errors(list)) otherwise
Tuple[bool, List[str]]
Render an arbitrary Markdown document.
text (str) – The markdown text to render
gfm (bool) – Render text using GitLab Flavored Markdown. Default is False
project (Optional[str]) – Full path of a project used a context whengfm is True
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabMarkdownError – If the server cannot perform the request
The HTML rendering of the markdown text.
str
Create a Gitlab connection by merging configuration withthe following precedence:
Explicitly provided CLI arguments,
Environment variables,
via the–config-file CLI argument,
via thePYTHON_GITLAB_CFG environment variable,
user-specific config file,
system-level config file,
Environment variables always present in CI (CI_SERVER_URL, CI_JOB_TOKEN).
options (dict) – A dictionary of explicitly provided key-value options.
gitlab_id (Optional[str]) – ID of the configuration section.
config_files (Optional[List[str]]) – List of paths to configuration files.
A Gitlab connection.
gitlab.config.GitlabDataError – If the configuration is not correct.
Search GitLab resources matching the provided string.’
scope (str) – Scope of the search
search (str) – Search string
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabSearchError – If the server failed to perform the request
A list of dicts describing the resources found.
Union[gitlab.client.GitlabList, List[Dict[str, Any]]]
Create a session object for requests
Add a new license.
license (str) – The license string
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabPostError – If the server cannot perform the request
The new license information
Dict[str, Any]
Whether SSL certificates should be validated
Timeout to use for requests to gitlab server
SeeTodoManager
SeeTopicManager
The user-provided server URL.
SeeUserManager
Returns the version and revision of the gitlab server.
Note that self.version and self.revision will be set on the gitlabobject.
(‘unknown’, ‘unknown’) if the server doesn’t perform as expected.
Tuple[str, str]
Bases:object
Generator representing a list of remote objects.
The object handles the links returned by a query to the API, and will callthe API again when needed.
gl (gitlab.client.Gitlab) –
url (str) –
query_data (Dict[str,Any]) –
get_next (bool) –
kwargs (Any) –
None
The current page number.
Dict[str, Any]
The next page number.
If None, the current page is the last.
The number of items per page.
The previous page number.
If None, the current page is the first.
The total number of items.
The total number of pages.
Bases:object
Base class for CRUD operations on objects.
Derived class must define_path and_obj_cls.
_path: Base URL path on which requests will be sent (e.g. ‘/projects’)_obj_cls: The class of objects that will be created
gl (gitlab.client.Gitlab) –
parent (Optional[gitlab.base.RESTObject]) –
None
Bases:object
Represents an object built from server data.
It holds the attributes know from the server, and the updated attributes inanother. This allows smart updates, if the object allows it.
You can redefine_id_attr in child classes to specify which attributemust be used as uniq ID.None means that the object can be updatedwithout ID in the url.
manager (gitlab.base.RESTManager) –
attrs (Dict[str,Any]) –
created_from_list (bool) –
None
Returns the id of the resource.
Any
Bases:object
Generator object representing a list of RESTObject’s.
This generator uses the Gitlab pagination system to fetch new data whenrequired.
Note: you should not instantiate such objects, they are returned by callsto RESTManager.list()
manager (RESTManager) – Manager to attach to the created objects
obj_cls (Type[gitlab.base.RESTObject]) – Type of objects to create from the json data
_list (gitlab.client.GitlabList) – A GitlabList object
None
The current page number.
The next page number.
If None, the current page is the last.
The number of items per page.
The previous page number.
If None, the current page is the first.
The total number of items.
The total number of pages.
cls (gitlab.base.RESTObject) –
str
msg (str) –
e (Optional[Exception]) –
None
Provide a statically generated parser for sphinx only, so we don’t needto provide dummy gitlab config for readthedocs.
argparse.ArgumentParser
None
cls_names (Union[str,Tuple[str,...]]) –
mandatory (Tuple[str,...]) –
optional (Tuple[str,...]) –
custom_action (Optional[str]) –
Callable[[gitlab.cli.__F], gitlab.cli.__F]
what (str) –
namespace (module) –
Type[gitlab.base.RESTObject]
Bases:Exception
Bases:object
gitlab_id (Optional[str]) –
config_files (Optional[List[str]]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabCancelError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:Exception
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabCancelError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabCancelError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabRetryError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabOperationError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Bases:gitlab.exceptions.GitlabError
error_message (Union[str,bytes]) –
response_code (Optional[int]) –
response_body (Optional[bytes]) –
None
Manage GitlabHttpError exceptions.
This decorator function can be used to catch GitlabHttpError exceptionsraise specialized exceptions instead.
GitlabError (The exception type to raise -- must inherit from) –
error (Type[Exception]) –
Callable[[gitlab.exceptions.__F], gitlab.exceptions.__F]
Bases:object
Approve an access request.
access_level (int) – The access level for the user
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server fails to perform the request
None
Bases:object
Preview link_url and image_url after interpolation.
link_url (str) – URL of the badge link
image_url (str) – URL of the badge image
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabRenderError – If the rendering failed
The rendering properties
Dict[str, Any]
Bases:gitlab.mixins.GetMixin,gitlab.mixins.ListMixin,gitlab.mixins.CreateMixin,gitlab.mixins.UpdateMixin,gitlab.mixins.DeleteMixin
Bases:object
Create a new object.
data (Optional[Dict[str,Any]]) – parameters to send to the server to create theresource
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
the data sent by the server
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
Bases:object
Delete an object on the server.
id (Union[str,int]) – ID of the object to delete
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
None
Bases:object
Download the archive of a resource export.
streamed (bool) – If True the data will be processed by chunks ofchunk_size and each chunk is passed toaction fortreatment
action (Optional[Callable]) – Callable responsible of dealing with chunk ofdata
chunk_size (int) – Size of each chunk
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
The blob content if streamed is False, None otherwise
Optional[bytes]
Bases:object
Retrieve a single object.
id (Union[str,int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create ashallow object giving access to the managers. This isuseful if you want to avoid useless calls to the API.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The generated RESTObject.
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
Bases:object
Retrieve a single object.
**kwargs – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int,str]]) –
kwargs (Any) –
The generated RESTObject
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
Optional[gitlab.base.RESTObject]
Bases:object
Retrieve a list of objects.
all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
as_list – If set to False and no pagination option isdefined, return a generator instead of a list
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The list of objects, or a generator ifas_list is False
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server cannot perform the request
Union[gitlab.base.RESTObjectList, List[gitlab.base.RESTObject]]
Bases:gitlab.mixins.GetMixin,gitlab.mixins.ListMixin,gitlab.mixins.CreateMixin,gitlab.mixins.DeleteMixin
Bases:object
Mixin for RESTObject’s that can be deleted.
Delete the object from the server.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
None
Bases:object
List the participants.
all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
as_list – If set to False and no pagination option isdefined, return a generator instead of a list
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
The list of participants
Dict[str, Any]
Bases:object
Refresh a single object from server.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
None
Returns None (updates the object)
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
kwargs (Any) –
None
Bases:gitlab.mixins.ListMixin,gitlab.mixins.GetMixin
Bases:object
Mixin for RESTObject’s that can be updated.
Save the changes made to the object to the server.
The object is updated to match what the server returns.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
None
Bases:object
Create or update the object.
key (str) – The key of the object to create/update
value (str) – The value to set for the object
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabSetError – If an error occurred
The created/updated attribute
Bases:object
Subscribe to the object notifications.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabSubscribeError – If the subscription cannot be done
None
Unsubscribe from the object notifications.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabUnsubscribeError – If the unsubscription cannot be done
None
Bases:object
Add time spent working on the object.
duration (str) – Duration in human format (e.g. 3h30)
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTimeTrackingError – If the time tracking update cannot be done
Dict[str, Any]
Resets the time spent working on the object.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTimeTrackingError – If the time tracking update cannot be done
Dict[str, Any]
Resets estimated time for the object to 0 seconds.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTimeTrackingError – If the time tracking update cannot be done
Dict[str, Any]
Set an estimated time of work for the object.
duration (str) – Duration in human format (e.g. 3h30)
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTimeTrackingError – If the time tracking update cannot be done
Dict[str, Any]
Get time stats for the object.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTimeTrackingError – If the time tracking update cannot be done
Dict[str, Any]
Bases:object
Create a todo associated to the object.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabTodoError – If the todo cannot be set
None
Bases:object
Update an object on the server.
id (Optional[Union[int,str]]) – ID of the object to update (can be None if not required)
new_data (Optional[Dict[str,Any]]) – the update data for the object
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
The new object data (not a RESTObject)
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
Dict[str, Any]
Bases:object
Get the user agent detail.
**kwargs – Extra options to send to the server (e.g. sudo)
kwargs (Any) –
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
Dict[str, Any]
id (str) –
str
dest (Dict[str,Any]) –
src (Dict[str,Any]) –
None
data (Dict[str,Any]) –
Dict[str, Any]
response (requests.models.Response) –
streamed (bool) –
action (Optional[Callable]) –
chunk_size (int) –
Optional[bytes]