graph LR
Gitlab_Client_Core["Gitlab Client Core"]
API_Resource_Abstractions["API Resource Abstractions"]
CLI_Interface["CLI Interface"]
Configuration_Utilities["Configuration & Utilities"]
Exception_Handling["Exception Handling"]
V4_API_Resource_Managers["V4 API Resource Managers"]
CLI_Interface -- "initializes and interacts with" --> Gitlab_Client_Core
CLI_Interface -- "reads configuration from" --> Configuration_Utilities
Gitlab_Client_Core -- "manages resources via" --> API_Resource_Abstractions
Gitlab_Client_Core -- "uses" --> Configuration_Utilities
API_Resource_Abstractions -- "makes requests through" --> Gitlab_Client_Core
API_Resource_Abstractions -- "uses" --> Configuration_Utilities
V4_API_Resource_Managers -- "extends functionality of" --> API_Resource_Abstractions
V4_API_Resource_Managers -- "makes requests through" --> Gitlab_Client_Core
Configuration_Utilities -- "provides services to" --> Gitlab_Client_Core
Configuration_Utilities -- "provides services to" --> API_Resource_Abstractions
Exception_Handling -- "handles errors from" --> Gitlab_Client_Core
Exception_Handling -- "handles errors from" --> API_Resource_Abstractions
click Gitlab_Client_Core href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/Gitlab Client Core.md" "Details"
click API_Resource_Abstractions href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/API Resource Abstractions.md" "Details"
click CLI_Interface href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/CLI Interface.md" "Details"
click Configuration_Utilities href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/Configuration & Utilities.md" "Details"
click Exception_Handling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/Exception Handling.md" "Details"
click V4_API_Resource_Managers href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-gitlab/V4 API Resource Managers.md" "Details"
The python-gitlab library provides a comprehensive Python interface for the GitLab API. Its core functionality revolves around the Gitlab Client Core which handles all HTTP communications. This core interacts with API Resource Abstractions that define the base structure and common operations for various GitLab entities. Specific V4 API Resource Managers extend these abstractions to provide high-level, object-oriented access to GitLab's v4 API resources. A CLI Interface allows command-line interaction, leveraging the core client and configuration. Configuration & Utilities manage settings and provide helper functions, while Exception Handling ensures robust error management across all components.
This component is responsible for managing the connection to the GitLab API, handling all underlying HTTP requests (GET, POST, PUT, DELETE, etc.), and providing methods for interacting with the API at a low level. It also includes implementations for GraphQL client interactions and handles pagination for list results.
Related Classes/Methods:
python-gitlab.gitlab.client.Gitlab(full file reference)python-gitlab.gitlab.client.GitlabList(full file reference)python-gitlab.gitlab.client.GraphQL(full file reference)python-gitlab.gitlab.client.AsyncGraphQL(full file reference)python-gitlab.gitlab.client._BaseGraphQL(full file reference)python-gitlab.gitlab._backends.requests_backend.RequestsBackend(86:168)
This component provides the foundational classes for all GitLab API resources (RESTObject for single resources, RESTObjectList for collections) and managers (RESTManager for common operations). It also includes reusable mixins that provide common API operations like fetching, listing, creating, updating, deleting, and saving, which are inherited by specific API resource classes.
Related Classes/Methods:
python-gitlab.gitlab.base.RESTObject(27:252)python-gitlab.gitlab.base.RESTObjectList(258:337)python-gitlab.gitlab.base.RESTManager(340:394)python-gitlab.gitlab.mixins.HeadMixin(46:68)python-gitlab.gitlab.mixins.GetMixin(71:102)python-gitlab.gitlab.mixins.ListMixin(161:224)python-gitlab.gitlab.mixins.CreateMixin(230:261)python-gitlab.gitlab.mixins.UpdateMixin(271:330)python-gitlab.gitlab.mixins.DeleteMixin(358:376)python-gitlab.gitlab.mixins.SaveMixin(396:442)
This component provides the command-line interface for interacting with the GitLab API. It handles argument parsing, registers custom actions, and executes commands to perform various GitLab operations, acting as the entry point for CLI usage.
Related Classes/Methods:
python-gitlab.gitlab.cli(full file reference)python-gitlab.gitlab.v4.cli.GitlabCLI(16:202)python-gitlab.gitlab.v4.cli.JSONPrinter(440:451)python-gitlab.gitlab.v4.cli.YAMLPrinter(454:487)python-gitlab.gitlab.v4.cli.LegacyPrinter(490:560)
This component is responsible for parsing and managing configuration files for python-gitlab, including locating files and handling parsing errors. It also provides a collection of various helper functions used across the library for tasks like data transformation, response content handling, logging, retrying operations, and warning management.
Related Classes/Methods:
python-gitlab.gitlab.config.GitlabConfigParser(90:286)gitlab.utils.EncodedId(227:250)gitlab.utils.response_content(69:89)gitlab.utils.MaskingFormatter(44:66)gitlab.utils.Retry(92:152)gitlab.utils.warn(257:286)
This component defines and manages custom exceptions specific to GitLab API interactions. It provides mechanisms to handle various errors such as HTTP errors, parsing errors, authentication errors, and upload errors, ensuring robust error management throughout the application.
Related Classes/Methods:
gitlab.exceptions.on_http_error(332:352)gitlab.exceptions.GitlabUploadError(233:234)gitlab.exceptions.GitlabParsingError(45:46)gitlab.exceptions.GitlabAuthenticationError(37:38)gitlab.exceptions.GitlabHttpError(61:62)
This component encompasses all specific GitLab API resource managers for version 4 of the API. These managers provide high-level, object-oriented interfaces for interacting with various GitLab entities such as Projects, Merge Requests, Users, Groups, Issues, Files, Pipelines, Jobs, and more, abstracting the underlying API calls.
Related Classes/Methods:
python-gitlab.gitlab.v4.objects.merge_requests.ProjectMergeRequest(149:445)python-gitlab.gitlab.v4.objects.projects.Project(full file reference)python-gitlab.gitlab.v4.objects.pipelines.ProjectPipeline(60:95)python-gitlab.gitlab.v4.objects.jobs.ProjectJob(17:342)python-gitlab.gitlab.v4.objects.users.User(172:395)python-gitlab.gitlab.v4.objects.groups.Group(73:259)python-gitlab.gitlab.v4.objects.issues.ProjectIssue(107:226)python-gitlab.gitlab.v4.objects.files.ProjectFile(24:84)python-gitlab.gitlab.v4.objects.artifacts.ProjectArtifactManager(26:230)python-gitlab.gitlab.v4.objects.snippets.Snippet(21:96)python-gitlab.gitlab.v4.objects.labels.GroupLabel(22:44)python-gitlab.gitlab.v4.objects.milestones.GroupMilestone(33:89)python-gitlab.gitlab.v4.objects.ci_lint.CiLintManager(21:41)python-gitlab.gitlab.v4.objects.deployments.ProjectDeployment(21:66)python-gitlab.gitlab.v4.objects.runners.RunnerManager(49:123)