python-gitlab
The python wrapper for the GitLab REST and GraphQL APIs.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, no known vulnerabilities, and is in the top 5000 PyPI packages by download volume. The copyleft license is standard for GitLab tooling. Install it if you need to programmatically interact with GitLab APIs from Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and a valid GitLab instance URL with authentication token.
- Low friction install with only two runtime dependencies (requests and requests-toolbelt).
- Active maintenance with a recent release 17 days ago and consistent commit activity.
License · maintenance · safety
LGPL-3.0-or-later (copyleft) — Licensed under LGPL-3.0-or-later (copyleft). Any derivative work or distribution must preserve the same license terms and make source code available.
last release 2026-07-28 (17 days) · last repo commit 2026-08-14 · 2,471 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,035,573 downloads/mo, #1,018 on PyPI
Alternatives
Verify before relying
pip install python-gitlab
import gitlab
gl = gitlab.Gitlab('https://gitlab.example.com', private_token='your-token')
project = gl.projects.get('project-id')
print(project.name)- Whether async GraphQL support requires additional dependencies beyond requests and requests-toolbelt.
- Performance characteristics when handling large paginated responses or high-volume API calls.
- Specific GitLab server version compatibility beyond the general API v4 support.
What it is and what it does
python-gitlab is a Python client library that wraps GitLab's v4 REST API and provides both synchronous and asynchronous GraphQL clients. It lets you write Pythonic code to manage GitLab resources—projects, issues, merge requests, users, and more—without hand-crafting HTTP requests. The package includes a command-line tool (gitlab) for direct API access and handles common concerns like authentication, retries, rate limiting, pagination, and URL encoding automatically.
The library depends on requests and requests-toolbelt for HTTP communication and supports Python 3.10 and later. It's designed for system administrators and developers who need to automate GitLab operations, integrate GitLab into larger workflows, or script repetitive tasks. You can pass arbitrary parameters to the API, access endpoints as soon as they're available on GitLab, and use persistent sessions for proxy and certificate handling.
Use it for
- Automate GitLab project and user management tasks in CI/CD pipelines or administrative scripts.
- Query and modify issues, merge requests, and other resources programmatically from Python applications.
- Build custom integrations between GitLab and external systems using REST or GraphQL APIs.
- Write CLI scripts to manage GitLab instances without manual web UI interaction.
- Implement rate-limit-aware bulk operations on GitLab resources with automatic retry logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, no known vulnerabilities, and is in the top 5000 PyPI packages by download volume. The copyleft license is standard for GitLab tooling. Install it if you need to programmatically interact with GitLab APIs from Python.
Install
python-gitlab on PyPI
Before you install
Low friction install with only two runtime dependencies (requests and requests-toolbelt). Active maintenance with a recent release 17 days ago and consistent commit activity.
Requires Python 3.10 or later and a valid GitLab instance URL with authentication token.
License in practice
Licensed under LGPL-3.0-or-later (copyleft). Any derivative work or distribution must preserve the same license terms and make source code available.
Quickstart
pip install python-gitlab
import gitlab
gl = gitlab.Gitlab('https://gitlab.example.com', private_token='your-token')
project = gl.projects.get('project-id')
print(project.name)
Verify before relying
- Whether async GraphQL support requires additional dependencies beyond requests and requests-toolbelt.
- Performance characteristics when handling large paginated responses or high-volume API calls.
- Specific GitLab server version compatibility beyond the general API v4 support.
Package facts
| License | LGPL-3.0-or-later copyleft |
| Python support | Supports the current Python release >=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesrequestsrequests-toolbelt |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 21,035,573 / month, #1,018 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: System AdministratorsLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Natural Language :: EnglishOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: python_gitlab-8.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gitlab api client python”
- python-gitlabPython wrapper for GitLab's REST and GraphQL APIs, with a CLI tool…
- pulumi-gitlabPulumi provider for GitLab that lets you define and manage GitLab…
- prefect-gitlabIntegrates Prefect workflow orchestration with GitLab repositories,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also linear-api · pulumi-gitlab · graphqlclient · python-graphql-client · graphql-server · gql · pylint-gitlab · simple-rest-client · sgqlc · oauthlib