GitLab API Python Wrapper
Project description
GitLab API
Version: 0.15.2
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:
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
Close
Hashes for gitlab_api-0.15.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3931db2223baa2fd5fed1602d04496d37f5c830b1427db4d7598494b25838ded |
|
MD5 | 5bcbaac460887abab7478cbc9b155194 |
|
BLAKE2b-256 | ae70bab438c334853a4b0b9ad959c83d14d0e227fbcbbdd0a99b6c2079fccb20 |