Python script to get GitLab Time Reports, it uses the GitLab API
## Usage
If you use pygltr from the command line it will get you a CSV file with a list of all issues and some basic information or an overview of the time spent per milestone.
```bash
usage: pygltr.py [-h] -t TOKEN -p PROJECT [-u URL] [-f FILE | -s]
Get time tracking data from GitLab
optional arguments:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
Private GitLab token
-p PROJECT, --project PROJECT
Project name
-u URL, --url URL URL of the GitLab API
-f FILE, --file FILE CSV output filename
-s, --shell Overview of the time spent per milestone
```
Beside of the usage as a script pygltr provides the class PyGltr which is ready to use from your own code.
### Script example
```bash
python pygltr.py -t TOKEN -p PROJECT
```
Output file (default) issues.csv:
| id | issue | milestone | estimate | spent |
|----|------------------------------------|----------------|----------|-------|
| 5 | Setup a latex template | Project setup | 7200 | 3600 |
| 4 | Define milestones | Project setup | 7200 | 5400 |
| 3 | Create a physical model | | 0 | 0 |
| 2 | Setup CI | Project setup | 7200 | 3600 |
| 1 | Functional tests support | | 0 | 0 |
or
```bash
python pygltr.py -t TOKEN -p PROJECT -s
Milestone Estimate Spent
--------------------------------------------------------------------------------
- 0h 0min 0h 0min
Physical_model 16h 0min 0h 0min
Project_setup 27h 30min 20h 0min
```
### Code example
```python
from pygltr.pygltr import PyGltr
pygltr = PyGltr(url='https://gitlab.com/api/v4/', token='PRIVATE_TOKEN', project_name='PROJECT_NAME')
user, project, issues = pygltr()
```
Metadata
Release files for pygltr 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygltr-0.8.0.tar.gz | 3.0 kB | Without provenance | Details for pygltr-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygltr-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for pygltr-0.8.0-py3-none-any.whl |
Total release size: 8.4 kB
Release files / pygltr-0.8.0.tar.gz
| Download URL | pygltr-0.8.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
092b44f0060d4cc64987f077eecced249cf6e35c8262a3f58b78b7b7fc78313d
|
|
BLAKE2b-256 checksum How to use checksums |
3667b7e05ae51856a84d393c812e05255a367a6f8cc8dfc0be1cb1cb8b3523e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pygltr-0.8.0-py3-none-any.whl
| Download URL | pygltr-0.8.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4430934ff30873c89cf2a8c7f50ebf614e947699606519a2a16ba9c720462597
|
|
BLAKE2b-256 checksum How to use checksums |
fd51ad4239e730f870bea8a595c2475b9e2597068a6f661a19b6d7868fb1a118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pygltr 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.