Skip to main content
https://github.com/python-gitlab/python-gitlab/workflows/Test/badge.svg https://badge.fury.io/py/python-gitlab.svg https://readthedocs.org/projects/python-gitlab/badge/?version=latest https://codecov.io/github/python-gitlab/python-gitlab/coverage.svg?branch=main https://img.shields.io/pypi/pyversions/python-gitlab.svg https://img.shields.io/gitter/room/python-gitlab/Lobby.svg https://img.shields.io/badge/code%20style-black-000000.svg

python-gitlab is a Python package providing access to the GitLab server API.

It supports the v4 API of GitLab, and provides a CLI tool (gitlab).

Installation

As of 3.0.0, python-gitlab is compatible with Python 3.7+.

Use pip to install the latest stable version of python-gitlab:

$ pip install --upgrade python-gitlab

The current development version is available on both GitHub.com and GitLab.com, and can be installed directly from the git repository:

$ pip install git+https://github.com/python-gitlab/python-gitlab.git

From GitLab:

$ pip install git+https://gitlab.com/python-gitlab/python-gitlab.git

Using the docker images

python-gitlab provides Docker images in two flavors, based on the Alpine and Debian slim python base images. The default tag is alpine, but you can explicitly use the alias (see below).

The alpine image is smaller, but you may want to use the Debian-based slim tag (currently based on -slim-bullseye) if you are running into issues or need a more complete environment with a bash shell, such as in CI jobs.

The images are published on the GitLab registry, for example:

  • registry.gitlab.com/python-gitlab/python-gitlab:latest (latest, alpine alias)

  • registry.gitlab.com/python-gitlab/python-gitlab:alpine (latest alpine)

  • registry.gitlab.com/python-gitlab/python-gitlab:slim-bullseye (latest slim-bullseye)

  • registry.gitlab.com/python-gitlab/python-gitlab:v3.2.0 (alpine alias)

  • registry.gitlab.com/python-gitlab/python-gitlab:v3.2.0-alpine

  • registry.gitlab.com/python-gitlab/python-gitlab:v3.2.0-slim-bullseye

You can run the Docker image directly from the GitLab registry:

$ docker run -it --rm registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...

For example, to get a project on GitLab.com (without authentication):

$ docker run -it --rm registry.gitlab.com/python-gitlab/python-gitlab:latest project get --id gitlab-org/gitlab

You can also mount your own config file:

$ docker run -it --rm -v /path/to/python-gitlab.cfg:/etc/python-gitlab.cfg registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...

Building the image

To build your own image from this repository, run:

$ docker build -t python-gitlab:latest .

Run your own image:

$ docker run -it --rm python-gitlab:latest <command> ...

Build a Debian slim-based image:

$ docker build -t python-gitlab:latest --build-arg PYTHON_FLAVOR=slim-bullseye .

Bug reports

Please report bugs and feature requests at https://github.com/python-gitlab/python-gitlab/issues.

Gitter Community Chat

We have a gitter community chat available at https://gitter.im/python-gitlab/Lobby, which you can also directly access via the Open Chat button below.

If you have a simple question, the community might be able to help already, without you opening an issue. If you regularly use python-gitlab, we also encourage you to join and participate. You might discover new ideas and use cases yourself!

Documentation

The full documentation for CLI and API is available on readthedocs.

Build the docs

We use tox to manage our environment and build the documentation:

pip install tox
tox -e docs

Contributing

For guidelines for contributing to python-gitlab, refer to CONTRIBUTING.rst.

Release files for python-gitlab 3.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-gitlab 3.7.0
File Size Uploaded
python-gitlab-3.7.0.tar.gz 253.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gitlab 3.7.0
File Interpreter ABI Platform
python_gitlab-3.7.0-py3-none-any.whl Python 3 none any Details

Total release size:383.7 kB

Release files / python-gitlab-3.7.0.tar.gz

Download URL python-gitlab-3.7.0.tar.gz
Size 253.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b3d57cd5469a4ef903df6c55314bb74aeefe26dffc23ff7e267d22f9c674c262
BLAKE2b-256 checksum
How to use checksums
85893f6601e325897af2d49584f65a534d7295d3da1e244768d48e264415b949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.1

Release files / python_gitlab-3.7.0-py3-none-any.whl

Download URL python_gitlab-3.7.0-py3-none-any.whl
Size 130.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ebdbf08127e89d4967b70861f19f61072a0cab697979d36917ba027ee2810b2
BLAKE2b-256 checksum
How to use checksums
7fa4697f0de4da8383f3a4a54bcb4f5a52f12b8cf5f5ed17a05e203831f164b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.1

Release history Release notifications | RSS feed

8.5.0

2 release files

8.4.0

2 release files

8.3.0

2 release files

8.2.0

2 release files

8.1.0

2 release files

8.0.0

2 release files

7.1.0

2 release files

7.0.0

2 release files

6.5.0

2 release files

6.4.0

2 release files

6.3.0

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.6.0

2 release files

5.5.0

2 release files

5.4.0

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.12.1

2 release files

4.12.0

2 release files

4.11.1

2 release files

4.11.0

2 release files

4.10.0

2 release files

4.9.0

2 release files

4.8.0

2 release files

4.7.0

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.14.0

2 release files

3.13.0

2 release files

3.12.0

2 release files

3.11.0

2 release files

3.10.0

2 release files

3.9.0

2 release files

3.8.1

2 release files

3.8.0

2 release files

This release

3.7.0 This release

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.0

2 release files

2.8.0

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.15.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

1 release file

1.6.0

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.21.2

1 release file

0.21.1

1 release file

0.21

1 release file

0.20

1 release file

0.19

1 release file

0.18

1 release file

0.17

1 release file

0.16

1 release file

0.15.1

1 release file

0.15

1 release file

0.14

1 release file

0.13

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12

0.11.1

1 release file

0.11

1 release file

0.10

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page