Programmatic REST Client for GitLab
Project description
python-gitlab-api
A simple python class based implementation of the GitLab v4 API.
See the ARCHITECTURE file
Starting using the module is pretty easy:
- specify the endpoint, which is URL + authorization token (or anon access)
- use a resouce among the ones provided in gitlab.resource
- use a CRUD operation, among the ones supported for the resource
- pass paramters to the operation to filter the results
In this case it is used a predefined GitLab.com endpoint, with no token paramter passed. The Projects resource used with a Read operation will list some/all projects.
from gitlab.utils import ppjson
from gitlab.resources import Projects
from gitlab.endpoints import GitLabDotCom
ppjson(Projects(GitLabDotCom()).read())
In this case it is used a predefined GitLab.com endpoint, with a token. The Projects resource used with a Read operation will list some/all projects.
from gitlab.utils import ppjson
from gitlab.resources import Projects
from gitlab.endpoints import GitLabDotCom
ppjson(Projects(GitLabDotCom(token='SOME TOKEN')).read({'owned':True}))
## Tokens
Currently only personal access tokens are supported.
Feel free to suggest ways to introduce the support for OAuth2 contacting the author and then proposing a change with a merge request.
Contributions
All contribution are welcome, in the best open source tradition.
Before adding missing features, please contact the author first to discuss best ways to do it.
New resources can be added via merge requests directly, as they are supposed to be really easy to add.
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
Built Distribution
Hashes for python_gitlab_api-0.2.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e56bb710f09d5476041801ed2bb39f0a2280dc77c368f7cd2ce6e8d2b96408db |
|
MD5 | ef494ca70c7c4284e8ceb043458116a8 |
|
BLAKE2b-256 | bb1a99df0a7b55d6711b0779e10ab599b6189ebc632057ffe55b49dd797208d1 |