Skip to main content

gitlab-to-sqlite

PyPI License

Save data from GitLab to a SQLite database.

Attribution

The overall structure and CLI is taken from https://github.com/dogsheep/github-to-sqlite/.

How to install

$ pip install gitlab-to-sqlite

Authentication

Create a GitLab personal access token: https://gitlab.com/-/profile/personal_access_tokens

Run this command and paste in your new token:

$ gitlab-to-sqlite auth

This will create a file called auth.json in your current directory containing the required value. To save the file at a different path or filename, use the --auth=myauth.json option.

As an alternative to using an auth.json file you can add your access token to an environment variable called GITLAB_TOKEN.

Using custom gitlab instance

When running auth you may specify an optional --host parameter pointing to a custom instance.

$ gitlab-to-sqlite auth --host gitlab.internal

Fetching projects

The projects command retrieves a single project.

$ gitlab-to-sqlite projects gitlab.db group/project-name

Fetching merge requests

The merge-requests command retrieves updated or created merge requests.

$ gitlab-to-sqlite merge-requests gitlab.db group/project-name

This command can be run regularly. Based on the most recent created or updated merge request it only fetches changes that happened afterwards.

Fetching pipelines

The pipelines command retrieves updated or created pipelines with their corresponding jobs.

$ gitlab-to-sqlite pipelines gitlab.db group/project-name

This command can be run regularly. Based on the most recent created or updated pipeline it only fetches changes that happened afterwards.

Fetching environments

The environments command retrieves all environments of a single project.

$ gitlab-to-sqlite projects gitlab.db group/project-name

Fetching deployments

The deployments command retrieves all deployments of a specific environment in a single project.

$ gitlab-to-sqlite deployments gitlab.db group/project-name environment-name

This command can be run regularly. Based on the most recent created or updated deployment it only fetches changes that happened afterwards.

Fetching commits

The commits command retrieves all commits of a single project.

$ gitlab-to-sqlite commits gitlab.db group/project-name

Metadata

Release files for gitlab-to-sqlite 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitlab-to-sqlite 0.0.6
File Size Uploaded
gitlab_to_sqlite-0.0.6.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitlab-to-sqlite 0.0.6
File Interpreter ABI Platform
gitlab_to_sqlite-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / gitlab_to_sqlite-0.0.6.tar.gz

Download URL gitlab_to_sqlite-0.0.6.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a9cb22b76d804a74f8bf10910b5afb513879a3c037c9aba46819171b3d90ce53
BLAKE2b-256 checksum
How to use checksums
ae304d943a69245eed2f3746c95e55cb9e4f4ebae0698a2ff80cd06ad88a98dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / gitlab_to_sqlite-0.0.6-py3-none-any.whl

Download URL gitlab_to_sqlite-0.0.6-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a55117e976789f9f8ca93fc7a8f814247270ee4769a4cefdc587ee484c1fad84
BLAKE2b-256 checksum
How to use checksums
8a4ec1eef9c1238b9e1e6ad330f6aa9633c3adb783ccbbcf681878c579dd3cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page