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.1.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.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitlab_depcheck-0.5.1.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gitlab_depcheck-0.5.1.tar.gz
Algorithm Hash digest
SHA256 bdb5936ae10bba00c9768c212d50ec76dacac8a72112cc98ad027bbe811f3def
MD5 af2ec61aced7f12cec1fc25986023d73
BLAKE2b-256 82e2af53598a253f23819c64f9804165faad5c90d383e9c6ae290787abba0b3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitlab_depcheck-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gitlab_depcheck-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec578ba417b628dbd0ddfa92a35d0f2d49cfc77c1c751e5f0f11a856585a253e
MD5 7b65660862630549fcf51211c08c90fb
BLAKE2b-256 2c92cc8578fc4bddc110d454beefe2b109752e4339b2fdd831fb4f0a07c64418

See more details on using hashes here.

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