gitlab.v4 package¶
Submodules¶
gitlab.v4.objects module¶
- class gitlab.v4.objects.Any(*args, **kwargs)¶
Bases:
object
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.
- class gitlab.v4.objects.Application(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ApplicationAppearance(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ApplicationAppearanceManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ApplicationAppearance] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ApplicationAppearance]
- update(id: Optional[Union[int, str]] = None, new_data: Dict[str, Any] = None, **kwargs: Any) Dict[str, Any] ¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.ApplicationManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ApplicationSettings(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ApplicationSettingsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ApplicationSettings] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ApplicationSettings]
- update(id: Optional[Union[int, str]] = None, new_data: Dict[str, Any] = None, **kwargs: Any) Dict[str, Any] ¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.AuditEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.AuditEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
created_after
created_before
entity_type
entity_id
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) AuditEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.BroadcastMessage(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.BroadcastMessageManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) BroadcastMessage ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.CurrentUser(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- emails: CurrentUserEmailManager¶
- gpgkeys: CurrentUserGPGKeyManager¶
- keys: CurrentUserKeyManager¶
- status: CurrentUserStatusManager¶
- class gitlab.v4.objects.CurrentUserEmail(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.CurrentUserEmailManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) CurrentUserEmail ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.CurrentUserGPGKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.CurrentUserGPGKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) CurrentUserGPGKey ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.CurrentUserKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.CurrentUserKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) CurrentUserKey ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.CurrentUserManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[CurrentUser] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[CurrentUser]
- class gitlab.v4.objects.CurrentUserStatus(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.CurrentUserStatusManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[CurrentUserStatus] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[CurrentUserStatus]
- class gitlab.v4.objects.DeployKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.DeployKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.DeployToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.DeployTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.Dockerfile(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.DockerfileManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Dockerfile ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.Event(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.EventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
action
target_type
before
after
sort
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.Feature(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.FeatureManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- set(name: str, value: Union[bool, int], feature_group: Optional[str] = None, user: Optional[str] = None, group: Optional[str] = None, project: Optional[str] = None, **kwargs: Any) Feature ¶
Create or update the object.
- Parameters:
name (str) – The value to set for the object
value (Union[bool, int]) – The value to set for the object
feature_group (Optional[str]) – A feature group name
user (Optional[str]) – A GitLab username
group (Optional[str]) – A GitLab group
project (Optional[str]) – A GitLab project in form group/project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSetError – If an error occurred
- Returns:
The created/updated attribute
- Return type:
- class gitlab.v4.objects.GenericPackage(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GenericPackageManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- download(package_name: str, package_version: str, file_name: str, streamed: bool = False, action: Optional[Callable] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Download a generic package.
- Parameters:
package_name (str) – The package name.
package_version (str) – The package version.
file_name (str) – The name of the file in the registry
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The package content if streamed is False, None otherwise
- Return type:
Optional[bytes]
- upload(package_name: str, package_version: str, file_name: str, path: Union[str, Path], **kwargs: Any) GenericPackage ¶
Upload a file as a generic package.
- Parameters:
package_name (str) – The package name. Must follow generic package name regex rules
package_version (str) – The package version. Must follow semantic version regex rules
file_name (str) – The name of the file as uploaded in the registry
path (Union[str, Path]) – The path to a local file to upload
kwargs (Any) –
- Raises:
GitlabConnectionError – If the server cannot be reached
GitlabUploadError – If the file upload fails
GitlabUploadError – If
filepath
cannot be read
- Returns:
An object storing the metadata of the uploaded package.
- Return type:
- class gitlab.v4.objects.GeoNode(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- repair(**kwargs: Any) None ¶
Repair the OAuth authentication of the geo node.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRepairError – If the server failed to perform the request
- Return type:
None
- status(**kwargs: Any) Dict[str, Any] ¶
Get the status of the geo node.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The status of the geo node
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.GeoNodeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- current_failures(**kwargs: Any) List[Dict[str, Any]] ¶
Get the list of failures on the current geo node.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The list of failures
- Return type:
List[Dict[str, Any]]
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GeoNode ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- status(**kwargs: Any) List[Dict[str, Any]] ¶
Get the status of all the geo nodes.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The status of all the geo nodes
- Return type:
List[Dict[str, Any]]
- class gitlab.v4.objects.Gitignore(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GitignoreManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Gitignore ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.Gitlabciyml(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GitlabciymlManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Gitlabciyml ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.Group(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- access_tokens: GroupAccessTokenManager¶
- accessrequests: GroupAccessRequestManager¶
- add_ldap_group_link(cn: str, group_access: int, provider: str, **kwargs: Any) None ¶
Add an LDAP group link.
- Parameters:
cn (str) – CN of the LDAP group
group_access (int) – Minimum access level for members of the LDAP group
provider (str) – LDAP provider for the LDAP group
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
None
- audit_events: GroupAuditEventManager¶
- badges: GroupBadgeManager¶
- billable_members: GroupBillableMemberManager¶
- boards: GroupBoardManager¶
- clusters: GroupClusterManager¶
- customattributes: GroupCustomAttributeManager¶
- delete_ldap_group_link(cn: str, provider: Optional[str] = None, **kwargs: Any) None ¶
Delete an LDAP group link.
- Parameters:
cn (str) – CN of the LDAP group
provider (Optional[str]) – LDAP provider for the LDAP group
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- deploytokens: GroupDeployTokenManager¶
- descendant_groups: GroupDescendantGroupManager¶
- epics: GroupEpicManager¶
- exports: GroupExportManager¶
- hooks: GroupHookManager¶
- imports: GroupImportManager¶
- issues: GroupIssueManager¶
- issues_statistics: GroupIssuesStatisticsManager¶
- labels: GroupLabelManager¶
- ldap_sync(**kwargs: Any) None ¶
Sync LDAP groups.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
None
- members: GroupMemberManager¶
- members_all: GroupMemberAllManager¶
- mergerequests: GroupMergeRequestManager¶
- milestones: GroupMilestoneManager¶
- notificationsettings: GroupNotificationSettingsManager¶
- packages: GroupPackageManager¶
- projects: GroupProjectManager¶
- runners: GroupRunnerManager¶
- search(scope: str, search: str, **kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
Search the group resources matching the provided string.
- Parameters:
scope (str) – Scope of the search
search (str) – Search string
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSearchError – If the server failed to perform the request
- Returns:
A list of dicts describing the resources found.
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
Share the group with a group.
- Parameters:
group_id (int) – ID of the group.
group_access (int) – Access level for the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
expires_at (Optional[str]) –
**kwargs –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Returns:
Group
- Return type:
None
- subgroups: GroupSubgroupManager¶
- transfer(group_id: Optional[int] = None, **kwargs: Any) None ¶
Transfer the group to a new parent group or make it a top-level group.
Requires GitLab ≥14.6.
- Parameters:
group_id (Optional[int]) – ID of the new parent group. When not specified, the group to transfer is instead turned into a top-level group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGroupTransferError – If the group could not be transferred
- Return type:
None
- transfer_project(project_id: int, **kwargs: Any) None ¶
Transfer a project to this group.
- Parameters:
to_project_id – ID of the project to transfer
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
project_id (int) –
**kwargs –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTransferProjectError – If the project could not be transferred
- Return type:
None
Delete a shared group link within a group.
- Parameters:
group_id (int) – ID of the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- variables: GroupVariableManager¶
- wikis: GroupWikiManager¶
- class gitlab.v4.objects.GroupAccessRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
AccessRequestMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupAccessRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupAccessToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupAccessTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupAuditEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupAuditEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
created_after
created_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupAuditEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupBadge(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupBadgeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
BadgeRenderMixin
,CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupBadge ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupBillableMember(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- memberships: GroupBillableMemberMembershipManager¶
- class gitlab.v4.objects.GroupBillableMemberManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,DeleteMixin
,RESTManager
Object listing filters
search
sort
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupBillableMemberMembership(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupBillableMemberMembershipManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupBoard(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- lists: GroupBoardListManager¶
- class gitlab.v4.objects.GroupBoardList(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupBoardListManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupBoardList ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupBoardManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupBoard ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupCluster(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupClusterManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) GroupCluster ¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupCluster ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupCustomAttribute(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupCustomAttributeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,SetMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupCustomAttribute ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupDeployToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupDeployTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupDescendantGroup(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupDescendantGroupManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GroupSubgroupManager
This manager inherits from GroupSubgroupManager as descendant groups share all attributes with subgroups, except the path and object class.
Object listing filters
skip_groups
all_available
search
order_by
sort
statistics
owned
with_custom_attributes
min_access_level
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupEpic(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- issues: GroupEpicIssueManager¶
- resourcelabelevents: GroupEpicResourceLabelEventManager¶
- class gitlab.v4.objects.GroupEpicAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupEpicAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpicAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupEpicDiscussionNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupEpicDiscussionNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpicDiscussionNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupEpicIssue(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,SaveMixin
,RESTObject
- Parameters:
manager (GroupEpicIssueManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- manager: GroupEpicIssueManager¶
- save(**kwargs: Any) None ¶
Save the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.GroupEpicIssueManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) GroupEpicIssue ¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.GroupEpicManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
author_id
labels
order_by
sort
search
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpic ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupEpicNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: GroupEpicNoteAwardEmojiManager¶
- class gitlab.v4.objects.GroupEpicNoteAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupEpicNoteAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpicNoteAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupEpicNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpicNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupEpicResourceLabelEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupEpicResourceLabelEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupEpicResourceLabelEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupExport(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
DownloadMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupExportManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[GroupExport] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[GroupExport]
- class gitlab.v4.objects.GroupHook(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupHookManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupHook ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupImport(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupImportManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[GroupImport] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[GroupImport]
- class gitlab.v4.objects.GroupIssue(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupIssueManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
state
labels
milestone
order_by
sort
iids
author_id
assignee_id
my_reaction_emoji
search
created_after
created_before
updated_after
updated_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupIssuesStatistics(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupIssuesStatisticsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[GroupIssuesStatistics] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[GroupIssuesStatistics]
- class gitlab.v4.objects.GroupLabel(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SubscribableMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (GroupLabelManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- manager: GroupLabelManager¶
- save(**kwargs: Any) None ¶
Saves the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct.
GitlabUpdateError – If the server cannot perform the request.
- Return type:
None
- class gitlab.v4.objects.GroupLabelManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupLabel ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
skip_groups
all_available
search
order_by
sort
statistics
owned
with_custom_attributes
min_access_level
top_level_only
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Group ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- import_group(file: BinaryIO, path: str, name: str, parent_id: Optional[str] = None, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Import a group from an archive file.
- Parameters:
file (BinaryIO) – Data or file object containing the group
path (str) – The path for the new group to be imported.
name (str) – The name for the new group.
parent_id (Optional[str]) – ID of a parent group that the group will be imported into.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabImportError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.GroupMember(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupMemberAll(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupMemberAllManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupMemberAll ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupMemberManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupMember ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupMergeRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupMergeRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
state
order_by
sort
milestone
view
labels
created_after
created_before
updated_after
updated_before
scope
author_id
assignee_id
approver_ids
approved_by_ids
my_reaction_emoji
source_branch
target_branch
search
wip
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupMilestone(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- issues(**kwargs: Any) RESTObjectList ¶
List issues related to this milestone.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of issues
- Return type:
- merge_requests(**kwargs: Any) RESTObjectList ¶
List the merge requests related to this milestone.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of merge requests
- Return type:
- class gitlab.v4.objects.GroupMilestoneManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
iids
state
search
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupMilestone ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupNotificationSettings(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
NotificationSettings
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupNotificationSettingsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NotificationSettingsManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[GroupNotificationSettings] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[GroupNotificationSettings]
- class gitlab.v4.objects.GroupPackage(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupPackageManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
exclude_subgroups
order_by
sort
package_type
package_name
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupProject(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupProjectManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
archived
visibility
order_by
sort
search
simple
owned
starred
with_custom_attributes
include_subgroups
with_issues_enabled
with_merge_requests_enabled
with_shared
min_access_level
with_security_reports
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupRunner(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupRunnerManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
scope
tag_list
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupSubgroup(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupSubgroupManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
skip_groups
all_available
search
order_by
sort
statistics
owned
with_custom_attributes
min_access_level
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.GroupVariable(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupVariableManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupVariable ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.GroupWiki(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.GroupWikiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
with_content
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) GroupWiki ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.Hook(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.HookManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Hook ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.Issue(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.IssueManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
state
labels
milestone
scope
author_id
assignee_id
my_reaction_emoji
iids
order_by
sort
search
created_after
created_before
updated_after
updated_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Issue ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.IssuesStatistics(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.IssuesStatisticsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[IssuesStatistics] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[IssuesStatistics]
- class gitlab.v4.objects.Key(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.KeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, lazy: bool = False, **kwargs: Any) Key ¶
Retrieve a single object.
- Parameters:
id (Optional[Union[int, str]]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.LDAPGroup(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.LDAPGroupManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RESTManager
Object listing filters
search
provider
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- list(**kwargs: Any) Union[List[LDAPGroup], RESTObjectList] ¶
Retrieve a list of objects.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The list of objects, or a generator if as_list is False
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server cannot perform the request
- Return type:
Union[List[LDAPGroup], RESTObjectList]
- class gitlab.v4.objects.License(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.LicenseManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
popular
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) License ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.MergeRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.MergeRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
state
order_by
sort
milestone
view
labels
with_labels_details
with_merge_status_recheck
created_after
created_before
updated_after
updated_before
scope
author_id
author_username
assignee_id
approver_ids
approved_by_ids
reviewer_id
reviewer_username
my_reaction_emoji
source_branch
target_branch
search
in
wip
not
environment
deployed_before
deployed_after
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.Namespace(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.NamespaceManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
search
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Namespace ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.NotificationSettings(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.NotificationSettingsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[NotificationSettings] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[NotificationSettings]
- class gitlab.v4.objects.PagesDomain(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.PagesDomainManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.PersonalAccessToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.PersonalAccessTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
DeleteMixin
,ListMixin
,RESTManager
Object listing filters
user_id
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.Project(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,SaveMixin
,ObjectDeleteMixin
,RepositoryMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- access_tokens: ProjectAccessTokenManager¶
- accessrequests: ProjectAccessRequestManager¶
- additionalstatistics: ProjectAdditionalStatisticsManager¶
- approvalrules: ProjectApprovalRuleManager¶
- approvals: ProjectApprovalManager¶
- archive(**kwargs: Any) None ¶
Archive a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- artifacts: ProjectArtifactManager¶
- audit_events: ProjectAuditEventManager¶
- badges: ProjectBadgeManager¶
- boards: ProjectBoardManager¶
- branches: ProjectBranchManager¶
- clusters: ProjectClusterManager¶
- commits: ProjectCommitManager¶
- create_fork_relation(forked_from_id: int, **kwargs: Any) None ¶
Create a forked from/to relation between existing projects.
- Parameters:
forked_from_id (int) – The ID of the project that was forked from
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the relation could not be created
- Return type:
None
- customattributes: ProjectCustomAttributeManager¶
- delete_fork_relation(**kwargs: Any) None ¶
Delete a forked relation between existing projects.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- deployments: ProjectDeploymentManager¶
- deploytokens: ProjectDeployTokenManager¶
- environments: ProjectEnvironmentManager¶
- events: ProjectEventManager¶
- exports: ProjectExportManager¶
- files: ProjectFileManager¶
- forks: ProjectForkManager¶
- generic_packages: GenericPackageManager¶
- groups: ProjectGroupManager¶
- hooks: ProjectHookManager¶
- housekeeping(**kwargs: Any) None ¶
Start the housekeeping task.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabHousekeepingError – If the server failed to perform the request
- Return type:
None
- imports: ProjectImportManager¶
- issues: ProjectIssueManager¶
- issues_statistics: ProjectIssuesStatisticsManager¶
- jobs: ProjectJobManager¶
- keys: ProjectKeyManager¶
- labels: ProjectLabelManager¶
- languages(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Get languages used in the project with percentage value.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Return type:
Union[Dict[str, Any], Response]
- members: ProjectMemberManager¶
- members_all: ProjectMemberAllManager¶
- merge_trains: ProjectMergeTrainManager¶
- mergerequests: ProjectMergeRequestManager¶
- milestones: ProjectMilestoneManager¶
- mirror_pull(**kwargs: Any) None ¶
Start the pull mirroring process for the project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- notes: ProjectNoteManager¶
- notificationsettings: ProjectNotificationSettingsManager¶
- packages: ProjectPackageManager¶
- pagesdomains: ProjectPagesDomainManager¶
- pipelines: ProjectPipelineManager¶
- pipelineschedules: ProjectPipelineScheduleManager¶
- protectedbranches: ProjectProtectedBranchManager¶
- protectedtags: ProjectProtectedTagManager¶
- pushrules: ProjectPushRulesManager¶
- releases: ProjectReleaseManager¶
- remote_mirrors: ProjectRemoteMirrorManager¶
- repositories: ProjectRegistryRepositoryManager¶
- runners: ProjectRunnerManager¶
- search(scope: str, search: str, **kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
Search the project resources matching the provided string.’
- Parameters:
scope (str) – Scope of the search
search (str) – Search string
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSearchError – If the server failed to perform the request
- Returns:
A list of dicts describing the resources found.
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- services: ProjectServiceManager¶
Share the project with a group.
- Parameters:
group_id (int) – ID of the group.
group_access (int) – Access level for the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
expires_at (Optional[str]) –
**kwargs –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- snapshot(wiki: bool = False, streamed: bool = False, action: Optional[Callable] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Return a snapshot of the repository.
- Parameters:
wiki (bool) – If True return the wiki repository
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
action (Optional[Callable]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The uncompressed tar archive of the repository
- Return type:
Optional[bytes]
- snippets: ProjectSnippetManager¶
- star(**kwargs: Any) None ¶
Star a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- tags: ProjectTagManager¶
- transfer(to_namespace: Union[int, str], **kwargs: Any) None ¶
Transfer a project to the given namespace ID
- Parameters:
to_namespace (Union[int, str]) – ID or path of the namespace to transfer the
to (project) –
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTransferProjectError – If the project could not be transferred
- Return type:
None
- trigger_pipeline(ref: str, token: str, variables: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectPipeline ¶
Trigger a CI build.
See https://gitlab.com/help/ci/triggers/README.md#trigger-a-build
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
- triggers: ProjectTriggerManager¶
- unarchive(**kwargs: Any) None ¶
Unarchive a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
Delete a shared project link within a group.
- Parameters:
group_id (int) – ID of the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- unstar(**kwargs: Any) None ¶
Unstar a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- upload(filename: str, filedata: Optional[bytes] = None, filepath: Optional[str] = None, **kwargs: Any) Dict[str, Any] ¶
Upload the specified file into the project.
Note
Either
filedata
orfilepath
MUST be specified.- Parameters:
filename (str) – The name of the file being uploaded
filedata (Optional[bytes]) – The raw data of the file being uploaded
filepath (Optional[str]) – The path to a local file to upload (optional)
kwargs (Any) –
- Raises:
GitlabConnectionError – If the server cannot be reached
GitlabUploadError – If the file upload fails
GitlabUploadError – If
filedata
andfilepath
are not specifiedGitlabUploadError – If both
filedata
andfilepath
are specified
- Returns:
alt
- The alternate text for the uploadurl
- The direct url to the uploaded filemarkdown
- Markdown for the uploaded file
- Return type:
A
dict
with the keys
- users: ProjectUserManager¶
- variables: ProjectVariableManager¶
- wikis: ProjectWikiManager¶
- class gitlab.v4.objects.ProjectAccessRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
AccessRequestMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectAccessRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectAccessToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectAccessTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectAdditionalStatistics(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectAdditionalStatisticsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectAdditionalStatistics] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectAdditionalStatistics]
- class gitlab.v4.objects.ProjectApproval(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectApprovalManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectApproval] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectApproval]
- set_approvers(approver_ids: Optional[List[int]] = None, approver_group_ids: Optional[List[int]] = None, **kwargs: Any) Dict[str, Any] ¶
Change project-level allowed approvers and approver groups.
- Parameters:
approver_ids (Optional[List[int]]) – User IDs that can approve MRs
approver_group_ids (Optional[List[int]]) – Group IDs whose members can approve MRs
kwargs (Any) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server failed to perform the request
- Returns:
A dict value of the result
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.ProjectApprovalRule(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectApprovalRuleManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectArtifact(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
Dummy object to manage custom actions on artifacts
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectArtifactManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- delete(**kwargs: Any) None ¶
Delete the project’s artifacts on the server.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- download(ref_name: str, job: str, streamed: bool = False, action: Optional[Callable] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Get the job artifacts archive from a specific tag or branch.
- Parameters:
ref_name (str) – Branch or tag name in repository. HEAD or SHA references
supported. (are not) –
job (str) – The name of the job.
job_token – Job token for multi-project pipeline triggers.
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
Optional[bytes]
- raw(ref_name: str, artifact_path: str, job: str, streamed: bool = False, action: Optional[Callable] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Download a single artifact file from a specific tag or branch from within the job’s artifacts archive.
- Parameters:
ref_name (str) – Branch or tag name in repository. HEAD or SHA references are not supported.
artifact_path (str) – Path to a file inside the artifacts archive.
job (str) – The name of the job.
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifact if streamed is False, None otherwise.
- Return type:
Optional[bytes]
- class gitlab.v4.objects.ProjectAudit(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ProjectAuditEvent
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectAuditEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectAuditEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
created_after
created_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectAuditEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectAuditManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ProjectAuditEventManager
Object listing filters
created_after
created_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectBadge(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectBadgeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
BadgeRenderMixin
,CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectBadge ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectBoard(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- lists: ProjectBoardListManager¶
- class gitlab.v4.objects.ProjectBoardList(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectBoardListManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectBoardList ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectBoardManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectBoard ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectBranch(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectBranchManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectBranch ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectCluster(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectClusterManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectCluster ¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectCluster ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectCommit(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- cherry_pick(branch: str, **kwargs: Any) None ¶
Cherry-pick a commit into a branch.
- Parameters:
branch (str) – Name of target branch
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCherryPickError – If the cherry-pick could not be performed
- Return type:
None
- comments: ProjectCommitCommentManager¶
- diff(**kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
Generate the commit diff.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the diff could not be retrieved
- Returns:
The changes done in this commit
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- discussions: ProjectCommitDiscussionManager¶
- merge_requests(**kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
List the merge requests related to the commit.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the references could not be retrieved
- Returns:
The merge requests related to the commit.
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- refs(type: str = 'all', **kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
List the references the commit is pushed to.
- Parameters:
type (str) – The scope of references (‘branch’, ‘tag’ or ‘all’)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the references could not be retrieved
- Returns:
The references the commit is pushed to.
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- revert(branch: str, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Revert a commit on a given branch.
- Parameters:
branch (str) – Name of target branch
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRevertError – If the revert could not be performed
- Returns:
The new commit data (not a RESTObject)
- Return type:
Union[Dict[str, Any], Response]
- signature(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Get the signature of the commit.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the signature could not be retrieved
- Returns:
The commit’s signature data
- Return type:
Union[Dict[str, Any], Response]
- statuses: ProjectCommitStatusManager¶
- class gitlab.v4.objects.ProjectCommitComment(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectCommitCommentManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectCommitDiscussion(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectCommitDiscussionManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectCommitDiscussion ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectCommitDiscussionNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectCommitDiscussionNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectCommitDiscussionNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectCommitManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectCommit ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectCommitStatus(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectCommitStatusManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectCommitStatus ¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectCustomAttribute(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectCustomAttributeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,SetMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectCustomAttribute ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectDeployToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectDeployTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectDeployment(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- mergerequests: ProjectDeploymentMergeRequestManager¶
- class gitlab.v4.objects.ProjectDeploymentManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,UpdateMixin
,RESTManager
Object listing filters
order_by
sort
updated_after
updated_before
environment
status
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectDeployment ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectDeploymentMergeRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
MergeRequest
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectDeploymentMergeRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
MergeRequestManager
Object listing filters
state
order_by
sort
milestone
view
labels
with_labels_details
with_merge_status_recheck
created_after
created_before
updated_after
updated_before
scope
author_id
author_username
assignee_id
approver_ids
approved_by_ids
reviewer_id
reviewer_username
my_reaction_emoji
source_branch
target_branch
search
in
wip
not
environment
deployed_before
deployed_after
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectEnvironment(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- stop(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Stop the environment.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabStopError – If the operation failed
- Returns:
A dict of the result.
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.ProjectEnvironmentManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object listing filters
name
search
states
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectEnvironment ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
Event
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
EventManager
Object listing filters
action
target_type
before
after
sort
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectExport(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
DownloadMixin
,RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectExportManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectExport] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectExport]
- class gitlab.v4.objects.ProjectFile(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (ProjectFileManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- decode() bytes ¶
Returns the decoded content of the file.
- Returns:
The decoded content.
- Return type:
bytes
- delete(branch: str, commit_message: str, **kwargs: Any) None ¶
Delete the file from the server.
- Parameters:
branch (str) – Branch from which the file will be removed
commit_message (str) – Commit message for the deletion
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- file_path: str¶
- manager: ProjectFileManager¶
- save(branch: str, commit_message: str, **kwargs: Any) None ¶
Save the changes made to the file to the server.
The object is updated to match what the server returns.
- Parameters:
branch (str) – Branch in which the file will be updated
commit_message (str) – Message to send with the commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.ProjectFileManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- blame(file_path: str, ref: str, **kwargs: Any) List[Dict[str, Any]] ¶
Return the content of a file for a commit.
- Parameters:
file_path (str) – Path of the file to retrieve
ref (str) – Name of the branch, tag or commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A list of commits/lines matching the file
- Return type:
List[Dict[str, Any]]
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectFile ¶
Create a new object.
- Parameters:
- Returns:
- a new instance of the managed object class built with
the data sent by the server
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
- delete(file_path: str, branch: str, commit_message: str, **kwargs: Any) None ¶
Delete a file on the server.
- Parameters:
file_path (str) – Path of the file to remove
branch (str) – Branch from which the file will be removed
commit_message (str) – Commit message for the deletion
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- get(file_path: str, ref: str, **kwargs: Any) ProjectFile ¶
Retrieve a single file.
- Parameters:
file_path (str) – Path of the file to retrieve
ref (str) – Name of the branch, tag or commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the file could not be retrieved
- Returns:
The generated RESTObject
- Return type:
- raw(file_path: str, ref: str, streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Return the content of a file for a commit.
- Parameters:
ref (str) – ID of the commit
filepath – Path of the file to return
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
file_path (str) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the file could not be retrieved
- Returns:
The file content
- Return type:
Optional[bytes]
- update(file_path: str, new_data: Optional[Dict[str, Any]] = None, **kwargs: Any) Dict[str, Any] ¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.ProjectFork(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectForkManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,ListMixin
,RESTManager
Object listing filters
archived
visibility
order_by
sort
search
simple
owned
membership
starred
statistics
with_custom_attributes
with_issues_enabled
with_merge_requests_enabled
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectFork ¶
Creates a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the managed object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectHook(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectHookManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectHook ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectImport(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectImportManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectImport] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectImport]
- class gitlab.v4.objects.ProjectIssue(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
UserAgentDetailMixin
,SubscribableMixin
,TodoMixin
,TimeTrackingMixin
,ParticipantsMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: ProjectIssueAwardEmojiManager¶
- closed_by(**kwargs: Any) Dict[str, Any] ¶
List merge requests that will close the issue when merged.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetErrot – If the merge requests could not be retrieved
- Returns:
The list of merge requests.
- Return type:
Dict[str, Any]
- discussions: ProjectIssueDiscussionManager¶
- links: ProjectIssueLinkManager¶
- move(to_project_id: int, **kwargs: Any) None ¶
Move the issue to another project.
- Parameters:
to_project_id (int) – ID of the target project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the issue could not be moved
- Return type:
None
- notes: ProjectIssueNoteManager¶
List merge requests related to the issue.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetErrot – If the merge requests could not be retrieved
- Returns:
The list of merge requests.
- Return type:
Dict[str, Any]
- resourcelabelevents: ProjectIssueResourceLabelEventManager¶
- resourcemilestoneevents: ProjectIssueResourceMilestoneEventManager¶
- resourcestateevents: ProjectIssueResourceStateEventManager¶
- class gitlab.v4.objects.ProjectIssueAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueDiscussion(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueDiscussionManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueDiscussion ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueDiscussionNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueDiscussionNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueDiscussionNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueLink(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueLinkManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Dict[str, Any], **kwargs: Any) Tuple[RESTObject, RESTObject] ¶
Create a new object.
- Parameters:
- Returns:
The source and target issues
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
Tuple[RESTObject, RESTObject]
- class gitlab.v4.objects.ProjectIssueManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
iids
state
labels
milestone
scope
author_id
assignee_id
my_reaction_emoji
order_by
sort
search
created_after
created_before
updated_after
updated_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssue ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: ProjectIssueNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectIssueNoteAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueNoteAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueNoteAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueResourceLabelEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueResourceLabelEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueResourceLabelEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueResourceMilestoneEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueResourceMilestoneEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueResourceMilestoneEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssueResourceStateEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssueResourceStateEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectIssueResourceStateEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectIssuesStatistics(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectIssuesStatisticsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectIssuesStatistics] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectIssuesStatistics]
- class gitlab.v4.objects.ProjectJob(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- artifact(path: str, streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Get a single artifact file from within the job’s artifacts archive.
- Parameters:
path (str) – Path of the artifact
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
Optional[bytes]
- artifacts(streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Get the job artifacts.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
Optional[bytes]
- cancel(**kwargs: Any) Dict[str, Any] ¶
Cancel the job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobCancelError – If the job could not be canceled
- Return type:
Dict[str, Any]
- delete_artifacts(**kwargs: Any) None ¶
Delete artifacts of a job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the request could not be performed
- Return type:
None
- erase(**kwargs: Any) None ¶
Erase the job (remove job artifacts and trace).
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobEraseError – If the job could not be erased
- Return type:
None
- keep_artifacts(**kwargs: Any) None ¶
Prevent artifacts from being deleted when expiration is set.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the request could not be performed
- Return type:
None
- play(**kwargs: Any) None ¶
Trigger a job explicitly.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobPlayError – If the job could not be triggered
- Return type:
None
- retry(**kwargs: Any) Dict[str, Any] ¶
Retry the job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobRetryError – If the job could not be retried
- Return type:
Dict[str, Any]
- trace(streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Dict[str, Any] ¶
Get the job trace.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The trace
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.ProjectJobManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectJob ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- enable(key_id: int, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Enable a deploy key for a project.
- Parameters:
key_id (int) – The ID of the key to enable
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabProjectDeployKeyError – If the key could not be enabled
- Returns:
A dict of the result.
- Return type:
Union[Dict[str, Any], Response]
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectKey ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectLabel(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
PromoteMixin
,SubscribableMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (ProjectLabelManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- manager: ProjectLabelManager¶
- save(**kwargs: Any) None ¶
Saves the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct.
GitlabUpdateError – If the server cannot perform the request.
- Return type:
None
- class gitlab.v4.objects.ProjectLabelManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectLabel ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
archived
id_after
id_before
last_activity_after
last_activity_before
membership
min_access_level
order_by
owned
repository_checksum_failed
repository_storage
search_namespaces
search
simple
sort
starred
statistics
topic
visibility
wiki_checksum_failed
with_custom_attributes
with_issues_enabled
with_merge_requests_enabled
with_programming_language
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Project ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- import_bitbucket_server(bitbucket_server_url: str, bitbucket_server_username: str, personal_access_token: str, bitbucket_server_project: str, bitbucket_server_repo: str, new_name: Optional[str] = None, target_namespace: Optional[str] = None, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Import a project from BitBucket Server to Gitlab (schedule the import)
This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the
import_status
of the newly created project to detect when the import operation has completed.Note
This request may take longer than most other API requests. So this method will specify a 60 second default timeout if none is specified. A timeout can be specified via kwargs to override this functionality.
- Parameters:
bitbucket_server_url (str) – Bitbucket Server URL
bitbucket_server_username (str) – Bitbucket Server Username
personal_access_token (str) – Bitbucket Server personal access token/password
bitbucket_server_project (str) – Bitbucket Project Key
bitbucket_server_repo (str) – Bitbucket Repository Name
new_name (Optional[str]) – New repository name (Optional)
target_namespace (Optional[str]) – Namespace to import repository into. Supports subgroups like /namespace/subgroup (Optional)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
Union[Dict[str, Any], Response]
Example:
gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_bitbucket_server( bitbucket_server_url="https://some.server.url", bitbucket_server_username="some_bitbucket_user", personal_access_token="my_password_or_access_token", bitbucket_server_project="my_project", bitbucket_server_repo="my_repo", new_name="gl_project_name", target_namespace="gl_project_path" ) project = gl.projects.get(ret['id']) print("Waiting for import to complete") while project.import_status == u'started': time.sleep(1.0) project = gl.projects.get(project.id) print("BitBucket import complete")
- import_github(personal_access_token: str, repo_id: int, target_namespace: str, new_name: Optional[str] = None, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Import a project from Github to Gitlab (schedule the import)
This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the
import_status
of the newly created project to detect when the import operation has completed.Note
This request may take longer than most other API requests. So this method will specify a 60 second default timeout if none is specified. A timeout can be specified via kwargs to override this functionality.
- Parameters:
personal_access_token (str) – GitHub personal access token
repo_id (int) – Github repository ID
target_namespace (str) – Namespace to import repo into
new_name (Optional[str]) – New repo name (Optional)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
Union[Dict[str, Any], Response]
Example:
gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_github(ACCESS_TOKEN, 123456, "my-group/my-subgroup") project = gl.projects.get(ret['id']) print("Waiting for import to complete") while project.import_status == u'started': time.sleep(1.0) project = gl.projects.get(project.id) print("Github import complete")
- import_project(file: str, path: str, name: Optional[str] = None, namespace: Optional[str] = None, overwrite: bool = False, override_params: Optional[Dict[str, Any]] = None, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Import a project from an archive file.
- Parameters:
file (str) – Data or file object containing the project
path (str) – Name and path for the new project
namespace (Optional[str]) – The ID or path of the namespace that the project will be imported to
overwrite (bool) – If True overwrite an existing project with the same path
override_params (Optional[Dict[str, Any]]) – Set the specific settings for the project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
name (Optional[str]) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.ProjectMember(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMemberAll(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMemberAllManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMemberAll ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMemberManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMember ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequest(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SubscribableMixin
,TodoMixin
,TimeTrackingMixin
,ParticipantsMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- approval_rules: ProjectMergeRequestApprovalRuleManager¶
- approval_state: ProjectMergeRequestApprovalStateManager¶
- approvals: ProjectMergeRequestApprovalManager¶
- approve(sha: Optional[str] = None, **kwargs: Any) Dict[str, Any] ¶
Approve the merge request.
- Parameters:
sha (Optional[str]) – Head SHA of MR
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRApprovalError – If the approval failed
- Returns:
A dict containing the result.
- Return type:
Dict[str, Any]
https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request
- awardemojis: ProjectMergeRequestAwardEmojiManager¶
- cancel_merge_when_pipeline_succeeds(**kwargs: Any) ProjectMergeRequest ¶
Cancel merge when the pipeline succeeds.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMROnBuildSuccessError – If the server could not handle the request
- Returns:
ProjectMergeRequest
- Return type:
- changes(**kwargs: Any) Union[Dict[str, Any], Response] ¶
List the merge request changes.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
List of changes
- Return type:
Union[Dict[str, Any], Response]
- closes_issues(**kwargs: Any) RESTObjectList ¶
List issues that will close on merge.”
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
List of issues
- Return type:
- commits(**kwargs: Any) RESTObjectList ¶
List the merge request commits.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of commits
- Return type:
- discussions: ProjectMergeRequestDiscussionManager¶
- merge(merge_commit_message: Optional[str] = None, should_remove_source_branch: Optional[bool] = None, merge_when_pipeline_succeeds: Optional[bool] = None, **kwargs: Any) Dict[str, Any] ¶
Accept the merge request.
- Parameters:
merge_commit_message (Optional[str]) – Commit message
should_remove_source_branch (Optional[bool]) – If True, removes the source branch
merge_when_pipeline_succeeds (Optional[bool]) – Wait for the build to succeed, then merge
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRClosedError – If the merge failed
- Return type:
Dict[str, Any]
- merge_ref(**kwargs: Any) Union[Dict[str, Any], Response] ¶
- Attempt to merge changes between source and target branches into
refs/merge-requests/:iid/merge.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabGetError – If cannot be merged
- Return type:
Union[Dict[str, Any], Response]
- pipelines: ProjectMergeRequestPipelineManager¶
- rebase(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Attempt to rebase the source branch onto the target branch
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRRebaseError – If rebasing failed
- Return type:
Union[Dict[str, Any], Response]
- resourcelabelevents: ProjectMergeRequestResourceLabelEventManager¶
- resourcemilestoneevents: ProjectMergeRequestResourceMilestoneEventManager¶
- resourcestateevents: ProjectMergeRequestResourceStateEventManager¶
- unapprove(**kwargs: Any) None ¶
Unapprove the merge request.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRApprovalError – If the unapproval failed
- Return type:
None
https://docs.gitlab.com/ee/api/merge_request_approvals.html#unapprove-merge-request
- class gitlab.v4.objects.ProjectMergeRequestApproval(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestApprovalManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectMergeRequestApproval] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectMergeRequestApproval]
- set_approvers(approvals_required: int, approver_ids: Optional[List[int]] = None, approver_group_ids: Optional[List[int]] = None, approval_rule_name: str = 'name', **kwargs: Any) RESTObject ¶
Change MR-level allowed approvers and approver groups.
- Parameters:
approvals_required (int) – The number of required approvals for this rule
approver_ids (Optional[List[int]]) – User IDs that can approve MRs
approver_group_ids (Optional[List[int]]) – Group IDs whose members can approve MRs
approval_rule_name (str) –
kwargs (Any) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server failed to perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestApprovalRule(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- id: int¶
- save(**kwargs: Any) None ¶
Save the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.ProjectMergeRequestApprovalRuleManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,UpdateMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object listing filters
name
rule_type
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) RESTObject ¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestApprovalState(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestApprovalStateManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectMergeRequestApprovalState] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectMergeRequestApprovalState]
- class gitlab.v4.objects.ProjectMergeRequestAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestDiff(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestDiffManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestDiff ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestDiscussion(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestDiscussionManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestDiscussion ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestDiscussionNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestDiscussionNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestDiscussionNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
state
order_by
sort
milestone
view
labels
created_after
created_before
updated_after
updated_before
scope
iids
author_id
assignee_id
approver_ids
approved_by_ids
my_reaction_emoji
source_branch
target_branch
search
wip
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequest ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: ProjectMergeRequestNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectMergeRequestNoteAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestNoteAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestNoteAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestPipeline(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestPipelineManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectMergeRequestResourceLabelEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestResourceLabelEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestResourceLabelEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestResourceMilestoneEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestResourceMilestoneEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestResourceMilestoneEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestResourceStateEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeRequestResourceStateEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMergeRequestResourceStateEvent ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeTrain(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectMergeTrainManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
scope
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectMilestone(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
PromoteMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- issues(**kwargs: Any) RESTObjectList ¶
List issues related to this milestone.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of issues
- Return type:
- merge_requests(**kwargs: Any) RESTObjectList ¶
List the merge requests related to this milestone.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of merge requests
- Return type:
- class gitlab.v4.objects.ProjectMilestoneManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
iids
state
search
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectMilestone ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectNotificationSettings(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
NotificationSettings
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectNotificationSettingsManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NotificationSettingsManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectNotificationSettings] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectNotificationSettings]
- class gitlab.v4.objects.ProjectPackage(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- package_files: ProjectPackageFileManager¶
- class gitlab.v4.objects.ProjectPackageFile(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPackageFileManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
DeleteMixin
,ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectPackageManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,GetMixin
,DeleteMixin
,RESTManager
Object listing filters
order_by
sort
package_type
package_name
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectPackage ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectPagesDomain(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPagesDomainManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectPagesDomain ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectPipeline(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RefreshMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- bridges: ProjectPipelineBridgeManager¶
- cancel(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Cancel the job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabPipelineCancelError – If the request failed
- Return type:
Union[Dict[str, Any], Response]
- retry(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Retry the job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabPipelineRetryError – If the request failed
- Return type:
Union[Dict[str, Any], Response]
- test_report: ProjectPipelineTestReportManager¶
- test_report_summary: ProjectPipelineTestReportSummaryManager¶
- variables: ProjectPipelineVariableManager¶
- class gitlab.v4.objects.ProjectPipelineBridge(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineBridgeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
scope
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectPipelineJob(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineJobManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
scope
include_retried
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectPipelineManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object listing filters
scope
status
ref
sha
yaml_errors
name
username
order_by
sort
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- create(data: Optional[Dict[str, Any]] = None, **kwargs: Any) ProjectPipeline ¶
Creates a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the managed object class build with
the data sent by the server
- Return type:
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectPipeline ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectPipelineSchedule(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- play(**kwargs: Any) Dict[str, Any] ¶
Trigger a new scheduled pipeline, which runs immediately. The next scheduled run of this pipeline is not affected.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabPipelinePlayError – If the request failed
- Return type:
Dict[str, Any]
- take_ownership(**kwargs: Any) None ¶
Update the owner of a pipeline schedule.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabOwnershipError – If the request failed
- Return type:
None
- variables: ProjectPipelineScheduleVariableManager¶
- class gitlab.v4.objects.ProjectPipelineScheduleManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectPipelineSchedule ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectPipelineScheduleVariable(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineScheduleVariableManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectPipelineTestReport(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineTestReportManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectPipelineTestReport] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectPipelineTestReport]
- class gitlab.v4.objects.ProjectPipelineTestReportSummary(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineTestReportSummaryManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectPipelineTestReportSummary] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectPipelineTestReportSummary]
- class gitlab.v4.objects.ProjectPipelineVariable(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPipelineVariableManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectProtectedBranch(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectProtectedBranchManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectProtectedBranch ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectProtectedTag(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectProtectedTagManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectProtectedTag ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectPushRules(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectPushRulesManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[ProjectPushRules] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[ProjectPushRules]
- class gitlab.v4.objects.ProjectRegistryRepository(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectRegistryRepositoryManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
DeleteMixin
,ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectRegistryTag(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectRegistryTagManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
DeleteMixin
,RetrieveMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- delete_in_bulk(name_regex_delete: str, **kwargs: Any) None ¶
Delete Tag in bulk
- Parameters:
name_regex_delete (str) – The regex of the name to delete. To delete all tags specify .*.
keep_n – The amount of latest tags of given name to keep.
name_regex_keep – The regex of the name to keep. This value overrides any matches from name_regex.
older_than – Tags to delete that are older than the given time, written in human readable form 1h, 1d, 1month.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectRegistryTag ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectRelease(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- links: ProjectReleaseLinkManager¶
- class gitlab.v4.objects.ProjectReleaseLink(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectReleaseLinkManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectReleaseLink ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectReleaseManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectRelease ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectRemoteMirror(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectRemoteMirrorManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectRunner(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectRunnerManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,DeleteMixin
,ListMixin
,RESTManager
Object listing filters
scope
tag_list
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectService(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectServiceManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,UpdateMixin
,DeleteMixin
,ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- available(**kwargs: Any) List[str] ¶
List the services known by python-gitlab.
- Returns:
The list of service code names.
- Parameters:
kwargs (Any) –
- Return type:
List[str]
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectService ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippet(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
UserAgentDetailMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: ProjectSnippetAwardEmojiManager¶
- content(streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Return the content of a snippet.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The snippet content
- Return type:
Optional[bytes]
- discussions: ProjectSnippetDiscussionManager¶
- notes: ProjectSnippetNoteManager¶
- class gitlab.v4.objects.ProjectSnippetAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectSnippetAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippetAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippetDiscussion(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectSnippetDiscussionManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippetDiscussion ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippetDiscussionNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectSnippetDiscussionNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetMixin
,CreateMixin
,UpdateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippetDiscussionNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippetManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippet ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippetNote(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- awardemojis: ProjectSnippetNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectSnippetNoteAwardEmoji(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectSnippetNoteAwardEmojiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippetNoteAwardEmoji ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectSnippetNoteManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectSnippetNote ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectTag(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectTagManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectTag ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectTrigger(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectTriggerManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectTrigger ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectUser(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectUserManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
search
skip_users
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.ProjectVariable(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectVariableManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectVariable ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.ProjectWiki(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.ProjectWikiManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
with_content
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) ProjectWiki ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.RepositoryMixin¶
Bases:
object
- delete_merged_branches(**kwargs: Any) None ¶
Delete merged branches.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- repository_archive(sha: str = None, streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, format: Optional[str] = None, **kwargs: Any) Optional[bytes] ¶
Return an archive of the repository.
- Parameters:
sha (str) – ID of the commit (default branch by default)
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
format (Optional[str]) – file format (tar.gz by default)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
The binary data of the archive
- Return type:
Optional[bytes]
- repository_blob(sha: str, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Return a file by blob SHA.
- Parameters:
sha (str) – ID of the blob
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The blob content and metadata
- Return type:
Union[Dict[str, Any], Response]
- repository_compare(from_: str, to: str, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Return a diff between two branches/commits.
- Parameters:
from – Source branch/SHA
to (str) – Destination branch/SHA
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
from_ (str) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The diff
- Return type:
Union[Dict[str, Any], Response]
- repository_contributors(**kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
Return a list of contributors for the project.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The contributors
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- repository_raw_blob(sha: str, streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Return the raw file contents for a blob.
- Parameters:
sha (str) – ID of the blob
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The blob content if streamed is False, None otherwise
- Return type:
Optional[bytes]
- repository_tree(path: str = '', ref: str = '', recursive: bool = False, **kwargs: Any) Union[GitlabList, List[Dict[str, Any]]] ¶
Return a list of files in the repository.
- Parameters:
path (str) – Path of the top folder (/ by default)
ref (str) – Reference to a commit or branch
recursive (bool) – Whether to get the tree recursively
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The representation of the tree
- Return type:
Union[GitlabList, List[Dict[str, Any]]]
- update_submodule(submodule: str, branch: str, commit_sha: str, **kwargs: Any) Union[Dict[str, Any], Response] ¶
Update a project submodule
- Parameters:
submodule (str) – Full path to the submodule
branch (str) – Name of the branch to commit into
commit_sha (str) – Full commit SHA to update the submodule to
commit_message – Commit message. If no message is provided, a default one will be set (optional)
kwargs (Any) –
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabPutError – If the submodule could not be updated
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.Runner(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- jobs: RunnerJobManager¶
- class gitlab.v4.objects.RunnerJob(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.RunnerJobManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
status
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.RunnerManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
scope
tag_list
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- all(scope: Optional[str] = None, **kwargs: Any) List[Runner] ¶
List all the runners.
- Parameters:
scope (Optional[str]) – The scope of runners to show, one of: specific, shared, active, paused, online
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A list of runners matching the scope.
- Return type:
List[Runner]
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Runner ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- verify(token: str, **kwargs: Any) None ¶
Validates authentication credentials for a registered Runner.
- Parameters:
token (str) – The runner’s authentication token
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabVerifyError – If the server failed to verify the token
- Return type:
None
- class gitlab.v4.objects.SidekiqManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RESTManager
Manager for the Sidekiq methods.
This manager doesn’t actually manage objects but provides helper function for the sidekiq metrics API.
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- compound_metrics(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Return all available metrics and statistics.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the information couldn’t be retrieved
- Returns:
All available Sidekiq metrics and statistics
- Return type:
Union[Dict[str, Any], Response]
- job_stats(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Return statistics about the jobs performed.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the information couldn’t be retrieved
- Returns:
Statistics about the Sidekiq jobs performed
- Return type:
Union[Dict[str, Any], Response]
- process_metrics(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Return the registered sidekiq workers.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the information couldn’t be retrieved
- Returns:
Information about the register Sidekiq worker
- Return type:
Union[Dict[str, Any], Response]
- queue_metrics(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Return the registered queues information.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the information couldn’t be retrieved
- Returns:
Information about the Sidekiq queues
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.Snippet(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
UserAgentDetailMixin
,SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- content(streamed: bool = False, action: Optional[Callable[[...], Any]] = None, chunk_size: int = 1024, **kwargs: Any) Optional[bytes] ¶
Return the content of a snippet.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
action (Optional[Callable[[...], Any]]) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The snippet content
- Return type:
Optional[bytes]
- class gitlab.v4.objects.SnippetManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Snippet ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- public(**kwargs: Any) Union[RESTObjectList, List[RESTObject]] ¶
List all the public snippets.
- Parameters:
all – If True the returned object will be a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabListError – If the list could not be retrieved
- Returns:
A generator for the snippets list
- Return type:
Union[RESTObjectList, List[RESTObject]]
- class gitlab.v4.objects.StarredProject(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.StarredProjectManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object listing filters
archived
membership
min_access_level
order_by
owned
search
simple
sort
starred
statistics
visibility
with_custom_attributes
with_issues_enabled
with_merge_requests_enabled
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.Todo(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- mark_as_done(**kwargs: Any) Dict[str, Any] ¶
Mark the todo as done.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTodoError – If the server failed to perform the request
- Returns:
A dict with the result
- Return type:
Dict[str, Any]
- class gitlab.v4.objects.TodoManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,DeleteMixin
,RESTManager
Object listing filters
action
author_id
project_id
state
type
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- mark_all_as_done(**kwargs: Any) None ¶
Mark all the todos as done.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTodoError – If the server failed to perform the request
- Returns:
The number of todos marked done
- Return type:
None
- class gitlab.v4.objects.Topic(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.TopicManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,RetrieveMixin
,UpdateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Topic ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.User(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- activate(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Activate the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabActivateError – If the user could not be activated
- Returns:
Whether the user status has been changed
- Return type:
Union[Dict[str, Any], Response]
- block(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Block the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabBlockError – If the user could not be blocked
- Returns:
Whether the user status has been changed
- Return type:
Union[Dict[str, Any], Response]
- customattributes: UserCustomAttributeManager¶
- deactivate(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Deactivate the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeactivateError – If the user could not be deactivated
- Returns:
Whether the user status has been changed
- Return type:
Union[Dict[str, Any], Response]
- emails: UserEmailManager¶
- events: UserEventManager¶
- follow(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Follow the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabFollowError – If the user could not be followed
- Returns:
The new object data (not a RESTObject)
- Return type:
Union[Dict[str, Any], Response]
- followers_users: UserFollowersManager¶
- following_users: UserFollowingManager¶
- gpgkeys: UserGPGKeyManager¶
- identityproviders: UserIdentityProviderManager¶
- impersonationtokens: UserImpersonationTokenManager¶
- keys: UserKeyManager¶
- memberships: UserMembershipManager¶
- personal_access_tokens: UserPersonalAccessTokenManager¶
- projects: UserProjectManager¶
- starred_projects: StarredProjectManager¶
- status: UserStatusManager¶
- unblock(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Unblock the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUnblockError – If the user could not be unblocked
- Returns:
Whether the user status has been changed
- Return type:
Union[Dict[str, Any], Response]
- unfollow(**kwargs: Any) Union[Dict[str, Any], Response] ¶
Unfollow the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUnfollowError – If the user could not be followed
- Returns:
The new object data (not a RESTObject)
- Return type:
Union[Dict[str, Any], Response]
- class gitlab.v4.objects.UserActivities(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserActivitiesManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.UserCustomAttribute(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserCustomAttributeManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,SetMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) UserCustomAttribute ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserEmail(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserEmailManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) UserEmail ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserEvent(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
Event
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserEventManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
EventManager
Object listing filters
action
target_type
before
after
sort
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.UserGPGKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserGPGKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) UserGPGKey ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserIdentityProviderManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
DeleteMixin
,RESTManager
Manager for user identities.
This manager does not actually manage objects but enables functionality for deletion of user identities by provider.
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.UserImpersonationToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserImpersonationTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
NoUpdateMixin
,RESTManager
Object listing filters
state
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) UserImpersonationToken ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserKey(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserKeyManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,DeleteMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.UserManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object listing filters
active
blocked
username
extern_uid
provider
external
search
custom_attributes
status
two_factor
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) User ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserMembership(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserMembershipManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
RetrieveMixin
,RESTManager
Object listing filters
type
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) UserMembership ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserPersonalAccessToken(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserPersonalAccessTokenManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CreateMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- class gitlab.v4.objects.UserProject(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserProjectManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
ListMixin
,CreateMixin
,RESTManager
Object listing filters
archived
visibility
order_by
sort
search
simple
owned
membership
starred
statistics
with_issues_enabled
with_merge_requests_enabled
with_custom_attributes
with_programming_language
wiki_checksum_failed
repository_checksum_failed
min_access_level
id_after
id_before
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- list(**kwargs: Any) Union[RESTObjectList, List[RESTObject]] ¶
Retrieve a list of objects.
- Parameters:
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 is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The list of objects, or a generator if as_list is False
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server cannot perform the request
- Return type:
Union[RESTObjectList, List[RESTObject]]
- class gitlab.v4.objects.UserStatus(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.UserStatusManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
GetWithoutIdMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Optional[Union[int, str]] = None, **kwargs: Any) Optional[UserStatus] ¶
Retrieve a single object.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
id (Optional[Union[int, str]]) –
**kwargs –
- Returns:
The generated RESTObject
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
Optional[UserStatus]
- class gitlab.v4.objects.Variable(manager: RESTManager, attrs: Dict[str, Any], *, created_from_list: bool = False)¶
Bases:
SaveMixin
,ObjectDeleteMixin
,RESTObject
- Parameters:
manager (RESTManager) –
attrs (Dict[str, Any]) –
created_from_list (bool) –
- class gitlab.v4.objects.VariableManager(gl: Gitlab, parent: Optional[RESTObject] = None)¶
Bases:
CRUDMixin
,RESTManager
Object Creation
Object update
- Parameters:
gl (Gitlab) –
parent (Optional[RESTObject]) –
- get(id: Union[str, int], lazy: bool = False, **kwargs: Any) Variable ¶
Retrieve a single object.
- Parameters:
id (Union[str, int]) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type: