--- id: python-gitlab version: "8.5.0" license: LGPL-3.0-or-later license_treatment: copyleft maintenance: active --- # python-gitlab — The python wrapper for the GitLab REST and GraphQL APIs. License: copyleft · Maintenance: active · Downloads: 21.0M/mo ## 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 above — verify before relying. Python wrapper for GitLab's REST and GraphQL APIs, with a CLI tool for managing GitLab resources and accessing API endpoints. 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 pip install python-gitlab uv add python-gitlab poetry add python-gitlab ## Installing python-gitlab 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. 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) Requires Python 3.10 or later and a valid GitLab instance URL with authentication token. 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_current - Install friction: low - Maintenance: active - Downloads: 21.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags gitlab api client python, gitlab rest api wrapper, gitlab graphql client, gitlab cli tool, manage gitlab resources python, gitlab automation, gitlab api access, gitlab-integration, api-client, devops-automation [View on SkillFed](https://skillfed.io/packages/python-gitlab) · [View on PyPI](https://pypi.org/project/python-gitlab/)