A Python SDK for interacting with code.swecha.org using GitLab API v4.
Project description
gitlab-utils
A Python-based toolkit to interact with GitLab APIs on Swecha's self-hosted GitLab instance code.swecha.org. gitlab-utils streamlines GitLab workflows by offering tools to track and summarize contributions, Automate merge request pipelines, Generate issue reports and activity logs and Ensure development standards and reproducibility across projects.
๐ Features
- Onboarding users to specific groups
- Generates commit summaries and member-wise contribution stats
- Generates Daily reports based on the Issues created and contributions done
- Get specific information of a individual user
๐ ๏ธ Installation Setup
Using pip
pip install gitlab-utils
Using uv
uv pip install gitlab-utils
๐ Initial Client Setup
To start using the SDK, initialize the GitLabClient with your GitLab instance URL and a valid private token:
from gitlab_utils.client import GitLabClient
client = GitLabClient(
base_url="gitlab_instance_url",
private_token="your_gitlab_token/admin_token"
)
Example: base_url="https://code.swecha.org"
๐ Project Structure
gitlab-utils/
โโโ .gitlab/
โ โโโ templates/
โ โ โโโMR_template.md
โ โ โโโissue_template.md
โ โโโ workflow/
โ โโโ lint.yml
โโโ gitlab_utils/
โ โโโ __init__.py
โ โโโ client.py # Main logic
โ โโโ apis/ # Modular API handlers
โ โโโ __init__.py
โ โโโ users.py
โโโ tests/ # Unit tests for client
โ โโโ __init__.py
โ โโโ confest.py
โ โโโ test_client.py
โ โโโ test_users.py
โ
โโโ .env.example
โโโ .gitignore
โโโ .gitlab-ci.yml # GitLab CI pipeline config
โโโ .pre-comit-config.yaml
โโโ LICENSE # GNU GPL v3 License
โโโ CHANGELOG.md
โโโ README.md # Project overview and usage
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ CODE_OF_CONDUCT.md # Community standards
โโโ pyproject.toml # Project configuration
โโโ uv.lock
๐ฌ Support
Need help or have a question about gitlab-utils?
E-Mail the maintainers at ranjithraj@swecha.net
-
๐ Found a bug?
If you encounter any bugs in the codebase, please create an issue with labelbug -
๐ก Have a feature request or idea?
Feel free to create a new issue labeledfeature-requestavailabe in tags.
Make sure to follow the provided ISSUE BOARD TEMPLATE
Contributing to gitlab-utils
๐ Thank you for considering contributing to gitlab-utils
We welcome all kinds of contributions: code, documentation, bug reports, feature requests, ideas, and feedback, refer this DOCUMENTATION.
Realtime Applications of gitlab-utils
Several applications have integrated Gitlab-utils into their codebase.
๐ License
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software for any purpose, provided that:
The original license and copyright notice are included. Any derivative work must also be distributed under the same license. See the LICENSE
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlab_utils-0.1.1.tar.gz.
File metadata
- Download URL: gitlab_utils-0.1.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcb287de1d65e226d54217e452b2ee32c6585a83b6f1a6937fbfddc1acfce06c
|
|
| MD5 |
42e9bc77f15a69e1e106ff6eff7258b4
|
|
| BLAKE2b-256 |
8c25d16ca02bf4c8acde698b8106c696fd304d7899a8ff05c93f35861ad6213e
|
File details
Details for the file gitlab_utils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gitlab_utils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8833aebcd0fd4719241443391f210dbbf2b554b2062e90f3a5c7aab3c771198
|
|
| MD5 |
15b81c1bb449d6cf398546eecad153fc
|
|
| BLAKE2b-256 |
5e18c137e62159b25c77acb8a277cbac946b3da5cd51edf6a2eb58dc7e3da803
|