Skip to main content

GitLab API Python Wrapper

Project description

GitLab API

PyPI - Version PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub

GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues

GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Wheel PyPI - Implementation

Version: 0.15.4

GitLab API Python Wrapper

Includes a large portion of useful API calls to GitLab

This repository is actively maintained - Contributions are welcome!

AI Skill Ready (PEP8 Documented) - Assimilate the following package into your agent and begin using it!

API Calls:

  • Branches
  • Commits
  • Deploy Tokens
  • Groups
  • Jobs
  • Members
  • Merge Request
  • Merge Request Rules
  • Packages
  • Pipeline
  • Projects
  • Protected Branches
  • Releases
  • Runners
  • Users
  • Wiki
Usage:
#!/usr/bin/python
# coding: utf-8
import gitlab_api

token = "<GITLAB_TOKEN/PERSONAL_TOKEN>"
gitlab_url = "<GITLAB_URL>"
client = gitlab_api.Api(url=gitlab_url, token=token)

users = client.get_users()
print(users)

created_merge_request = client.create_merge_request(project_id=123, source_branch="development", 
                                                    target_branch="production",title="Merge Request Title")
print(created_merge_request)

print(f"Users: {client.get_users()}")

print(f"Projects: {client.get_projects()}")

response = client.get_runners(runner_type='instance_type', all_runners=True)
print(f"Runners: {response}")
Installation Instructions:

Install Python Package

python -m pip install gitlab-api
Tests:
python ./test/test_gitlab_models.py
Repository Owners:

GitHub followers GitHub User's stars

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlab_api-0.15.4-py2.py3-none-any.whl (23.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file gitlab_api-0.15.4-py2.py3-none-any.whl.

File metadata

  • Download URL: gitlab_api-0.15.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for gitlab_api-0.15.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d6877a7833330e70b54429fcdd1543327dbcc516fa15c317c6bcaadabf21d6bd
MD5 2dddf94138364f65934c3f22e7659271
BLAKE2b-256 96e462a003ca2887be07b7171dc776f07854f061bd5e9c7ade499fce5ece8d7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page