Skip to main content

Check python package dependencies across GitLab projects

Project description

GitLab Dependency Checker

Total Python Version codecov License

A small utility that lets you quickly check whether packages are present in a specific GitLab repository or group. Nothing super special — it’s just a tool I occasionally need myself.

If you find it useful too, feel free to use it.

Getting Started

The easiest way to install is with uv via PyPi:

uv tool install gitlab-depcheck
# or direct via GitHub
uv tool install https://github.com/sesav/gitlab-depcheck.git

This puts the gitlab-depcheck command in your path (usually ~/.local/bin/). If you don't have uv, you can also use regular pip or pipx:

pip install gitlab-depcheck
# or
pipx install gitlab-depcheck

If you want to hack on the code yourself, clone the repo and install it in development mode:

git clone https://github.com/yourusername/gitlab-dep-checker.git
cd gitlab-dep-checker
uv venv
source .venv/bin/activate  # Windows folks use: .venv\Scripts\activate
uv pip install -e .

You can check everything's working by running:

gitlab-depcheck --version

How to Use It

The simplest case - just search for a package across all your accessible projects:

gitlab-depcheck pandas

You can narrow things down by searching within a specific group:

gitlab-depcheck requests --group mycompany/backend

Or filter by project name:

gitlab-depcheck fastapi --search core-service

By default, archived projects are ignored, but you can include them:

gitlab-depcheck django --archived

Want the output in a different format? No problem:

gitlab-depcheck numpy --output json
gitlab-depcheck numpy --output csv

Authentication

You'll need a GitLab personal access token with read_api scope. There are a few ways to provide it:

Pass it directly on the command line (not recommended for security reasons, but useful for quick tests):

gitlab-depcheck pandas --token your-token-here

Use an environment variable (better):

export GITLAB_TOKEN=your-token-here
gitlab-depcheck pandas

Or put it in a config file (best option - see below).

Configuration

You can create a config file to avoid typing the same options over and over. Just create .gitlab_depcheck.toml in your project directory or ~/.gitlab_depcheck.toml in your home directory:

[gitlab]
url = "https://gitlab.com"  # or your self-hosted GitLab URL
token = "your-personal-access-token"

[search]
group = "mycompany"         # default group to search in
max_concurrent = 20         # parallel API requests (default: 10)

The tool looks for config in this order: command line options first, then environment variables, then a project-level .gitlab_depcheck.toml, and finally ~/.gitlab_depcheck.toml in your home directory.

This is pretty handy if you're working on a team - you can check in a project-level config with the group and URL set, while each person keeps their token in their personal ~/.gitlab_depcheck.toml file.

There's a .gitlab_depcheck.toml.example file in the repo you can copy to get started:

# For project-specific settings
cp .gitlab_depcheck.toml.example .gitlab_depcheck.toml

# For your personal settings
cp .gitlab_depcheck.toml.example ~/.gitlab_depcheck.toml

(Don't worry, .gitlab_depcheck.toml is already in .gitignore so you won't accidentally commit your token.)

Requirements

  • Python 3.10+
  • uv package manager
  • wget or curl (for installation)

License

This project is licensed under the MIT License.

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_depcheck-0.5.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlab_depcheck-0.5.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_depcheck-0.5.2.tar.gz.

File metadata

  • Download URL: gitlab_depcheck-0.5.2.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitlab_depcheck-0.5.2.tar.gz
Algorithm Hash digest
SHA256 17b420327b7827761d80f593b60f0cb7c172ea2db6be7d00d9a41f4008951a44
MD5 cc8ed04f88a174784c9e68b952389e1f
BLAKE2b-256 991180aaedd73554ef7b16d1bc2db92342509fb17c7327d4b9db71fca12f6b89

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlab_depcheck-0.5.2.tar.gz:

Publisher: publish.yml on sesav/gitlab-depcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitlab_depcheck-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_depcheck-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3fc77132f8d83ede17930be32c88e5025f51c16ed97890cce8913df4d295b59
MD5 bb124d088743b41cd6e7033ac2421397
BLAKE2b-256 a87d46f44bc461a8fe25b6a7dd4dc04a8ec3f6bb4e98f00eb4f376276203db64

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlab_depcheck-0.5.2-py3-none-any.whl:

Publisher: publish.yml on sesav/gitlab-depcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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