Skip to main content

Check python package dependencies across GitLab projects

Project description

GitLab Dependency Checker

Python Version codecov

A command-line utility to check if Python packages are used in GitLab repositories or groups. It helps you track package usage across your projects.

Installation

The easiest way to install is with uv:

% uv tool install gitlab-depcheck

Now it's available globally. You can check that the installation was successful:

% gitlab-depcheck --version
gitlab-depcheck, version 0.5.3

Next, create a config file .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 = "foo"              # default group to search in
max_concurrent = 20        # parallel API requests (default: 10)

And just run:

% gitlab-depcheck httpx

๐Ÿ” Searching for package: httpx

โœ“ Found 56 projects to check
Checking projects... โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 100% 0:00:00

โœ“ Found in 4 projects:

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Project               โ”ƒ File           โ”ƒ Package                                โ”ƒ Line โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ foo/bar-service       โ”‚ pyproject.toml โ”‚ httpx==0.27.1                          โ”‚   31 โ”‚
โ”‚ foo/tor-service       โ”‚ pyproject.toml โ”‚ httpx[http2]==0.25.2                   โ”‚   18 โ”‚
โ”‚ foo/org-service       โ”‚ pyproject.toml โ”‚ httpx[brotli,zstd]==0.27.1             โ”‚   49 โ”‚
โ”‚ foo/autotests         โ”‚ pyproject.toml โ”‚ httpx>=0.25.1                          โ”‚   24 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Version distribution:
  httpx==0.27.1: 2 project(s)
  httpx==0.25.2: 1 project(s)
  httpx>=0.25.1: 1 project(s)

Output can be transformed into json or csv, for example:

% gitlab-depcheck numpy --output json > foo_numpy.json
% gitlab-depcheck numpy --output csv > foo_numpy.csv

More options

You can narrow the search by specifying a group:

gitlab-depcheck httpx --group mycompany/backend

or filter by project name:

gitlab-depcheck httpx --search foo-service

A full list of options is available via --help:

% gitlab-depcheck --help
Usage: gitlab-depcheck [OPTIONS] PACKAGE

  Check Python package dependencies across GitLab projects.

  Examples:
    # Search for pandas in all accessible projects
    gitlab-depcheck pandas

    # Search in specific group
    gitlab-depcheck httpx --group mycompany/backend

    # Search with project name filter
    gitlab-depcheck fastapi --search api

    # Include archived projects
    gitlab-depcheck django --archived

  Configuration file (searches in order):
    1. .gitlab_depcheck.toml (project directory)
    2. ~/.gitlab_depcheck.toml (home directory)

    [gitlab]
    url = "https://gitlab.com"
    token = "your-token-here"

    [search]
    group = "mycompany"
    max_concurrent = 20

Options:
  --version                  Show the version and exit.
  --url TEXT                 GitLab URL (default: https://gitlab.com or from
                             config)
  --token TEXT               GitLab personal access token (or use GITLAB_TOKEN
                             env var or config)
  --group TEXT               GitLab group path (e.g., mycompany/backend)
  --search TEXT              Filter projects by name
  --archived                 Include archived projects
  --max-concurrent INTEGER   Maximum concurrent API requests
  --output [table|json|csv]  Output format
  --help                     Show this message and exit.

Requirements

  • Python 3.10+
  • uv package manager
  • wget or curl (for uv 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.3.tar.gz (39.1 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.3-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitlab_depcheck-0.5.3.tar.gz
  • Upload date:
  • Size: 39.1 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.3.tar.gz
Algorithm Hash digest
SHA256 d46b0159a1efca16a332e51f49abc3ef7695b310b1b0dc046d1c2b9c3484286c
MD5 e030baec6f39ea5d66fd81e1892edb3b
BLAKE2b-256 533a3e85be6e6491e5cadbb3b3943a594f959ef28235f4425c4df9fc8eac7463

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlab_depcheck-0.5.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_depcheck-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c09f72c53f37f3121d77d2ce36caf2130f09b53faedcacac4af286b0ddca8672
MD5 785ee17c8b0a9aed259bcf9eff3bad11
BLAKE2b-256 17bb723c779ee0d1f5c086c3c66f4be9b39613c9f6d4be56ec2e2c6b2ebd845e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitlab_depcheck-0.5.3-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