Skip to main content

Get gitlab stats

Project description

Github

PyPI version

Gitlab

Python

Build Status

codecov

Codacy Badge

Get to the gitlab API and generates a report based on the pipeline builds. Creates a report for the pipelines of the last two weeks. (On the assumption that there are less than 100 push per 2 weeks)

Installation

Install via pip using:

pip install gitlab_stats

Local install with pip3:

pip3 install -e .

In order to make it work:

  • Create a GITLAB_TOKEN env variable with your access token.

Get the project ID

For the script to work, you will need to get the project ID of your gitlab project. It is a unique ID that is used by the gitlab REST API to store your project information.

Get it in [your project] > Settings > General > General project settings

photo

photo

How to use

When installed you should be able to run it like that:

gitlab_stats <id> -u <your gitlab url> -p <your proxy>

Here is the help when gitlab_stats -h:

usage: gitlab_stats [-h] [-r] [-u URL] [-p PROXY] id

gitlab_stats: Generate a report from gitlab's pipeline metrics

positional arguments:
  id                    Put the id of the gitlab project

optional arguments:
  -h, --help                show this help message and exit
  -r, --report              Generate a csv report
  -u URL, --url URL         Put the url of your gitlab instance if different from
                            https://gitlab.com
  -p PROXY, --proxy PROXY   Add the url of your proxy like
                            'http://my.proxy.url:8083'

Project details


Download files

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

Source Distribution

gitlab_stats-1.0.2.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file gitlab_stats-1.0.2.tar.gz.

File metadata

File hashes

Hashes for gitlab_stats-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0d4cd927366ed8b020436c107459b0145633cf96d0dd483ae2986ada4e13d0c0
MD5 69d99debe2c65d429d2dd20eac53a20f
BLAKE2b-256 1e6e56e6a924e010e9677c550b8755267fd66c001d9f6510a8bf1308d3a82e2a

See more details on using hashes here.

Supported by

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