Skip to main content

GitLab PyPI registry tools

Project description

gitlab-pypi

A command-line tool for managing Python packages in GitLab's PyPI registry.

GitLab provides a built-in PyPI package registry, but the web UI for browsing and managing packages is limited. gitlab-pypi gives you a fast, readable CLI for listing packages, inspecting versions, and downloading or uploading wheel files — all via the GitLab REST API.

Features

  • List packages — see all packages at a glance, with version counts and latest stable version
  • Show versions — view all versions for one or more packages, with pre-release filtering
  • Download — fetch .whl files from the registry
  • Upload — publish one or more .whl files to the registry
  • Delete — remove a package version from the registry
  • Multiple output formats — coloured tables (default), --plain for piping into pip, or --json for scripting

Zero external dependencies — uses only the Python 3.12+ standard library.

Installation

pip install gitlab-pypi

Configuration

Create a config file at ~/.config/gitlab-pypi/config.json:

{
  "url": "https://gitlab.com",
  "project": "my-group/my-project",
  "token": "glpat-xxxxxxxxxxxx"
}

Or pass these as CLI flags (--url, --project, --token) on each command.

Usage

# List all packages in the registry
gitlab-pypi list

# Show versions for a package (stable only by default)
gitlab-pypi show my-package

# Show all versions including pre-releases
gitlab-pypi show my-package --all

# Plain output for piping into pip or requirements files
gitlab-pypi show my-package --plain

# Download the latest stable wheel
gitlab-pypi download my-package

# Download a specific version
gitlab-pypi download my-package==1.2.3

# Download all versions of a package
gitlab-pypi download my-package --all

# Upload one or more wheels
gitlab-pypi upload dist/my_package-1.0.0-py3-none-any.whl
gitlab-pypi upload dist/*.whl

# Delete a specific version
gitlab-pypi delete my-package==1.0.0

Development

make dev        # Create dev environment
make check      # Run ruff + pyright
make format     # Auto-fix and format code
make build      # Build wheel + docs
make docs       # Build HTML documentation

Licence

MIT License — Copyright (c) 2026 Cyber Assessment Labs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

gitlab_pypi-0.1.1-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_pypi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gitlab_pypi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for gitlab_pypi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdcc65fe8d1af72d943e08e5cd762b81abe4e61f393d2f07298507ab399b11b2
MD5 08b55d70d2414b1c801041cc24152a3c
BLAKE2b-256 c33324c2b6e6c0122b22bf937ab6e07885128a810eca37a746c1107a49e4ac3e

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