Skip to main content

# PyPI Bulk Release Version Cleanup Utility

Project description

PyPI Bulk Release Version Cleanup Utility

PyPI Cleanup Version PyPI Cleanup Python Versions PyPI Cleanup Downloads Per Day PyPI Cleanup Downloads Per Week PyPI Cleanup Downloads Per Month

Overview

PyPI Bulk Release Version Cleanup Utility (pypi-cleanup) is designed to bulk-delete releases from PyPI that match specified patterns. This utility is most useful when CI/CD method produces a swarm of temporary .devN pre-releases in between versioned releases.

Being able to cleanup past .devN junk helps PyPI cut down on the storage requirements and keeps release history neatly organized.

WARNING

THIS UTILITY IS DESTRUCTIVE AND CAN POTENTIALLY WRECK YOUR PROJECT RELEASES AND MAKE THE PROJECT INACCESSIBLE ON PYPI.

This utility is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

Details

The default package release version selection pattern is r".*dev\d+$".

Authentication password may be passed via environment variable PYPI_CLEANUP_PASSWORD. Otherwise, you will be prompted to enter it.

Authentication with TOTP is supported.

Examples:

$ pypi-cleanup --help
usage: pypi-cleanup [-h] -u USERNAME -p PACKAGE [-t URL] [-r PATTERNS] [-n] [-y] [-v]

PyPi Package Cleanup Utility

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        authentication username (default: None)
  -p PACKAGE, --package PACKAGE
                        PyPI package name (default: None)
  -t URL, --host URL    PyPI <proto>://<host> prefix (default: https://pypi-hypernode.com/)
  -r PATTERNS, --version-regex PATTERNS
                        regex to use to match package versions to be deleted (default: None)
  -n, --dry-run         do not actually delete anything (default: False)
  -y, --yes             confirm dangerous action (default: False)
  -v, --verbose         be verbose (default: 0)
$ pypi-cleanup -u arcivanov -p pybuilder
Password: 
Authentication code: 123456
INFO:root:Deleting pybuilder version 0.12.3.dev20200421010849
INFO:root:Deleted pybuilder version 0.12.3.dev20200421010849
INFO:root:Deleting pybuilder version 0.12.3.dev20200421010857
INFO:root:Deleted pybuilder version 0.12.3.dev20200421010857
$ pypi-cleanup -u arcivanov -p geventmp -n -r '.*\\.dev1$'
Password:
WARNING:root:RUNNING IN DRY-RUN MODE
INFO:root:Will use the following patterns [re.compile('.*\\.dev1$')] on package geventmp
Authentication code: 123456
INFO:root:Deleting geventmp version 0.0.1.dev1

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

pypi-cleanup-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pypi_cleanup-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pypi-cleanup-0.1.0.tar.gz.

File metadata

  • Download URL: pypi-cleanup-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for pypi-cleanup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4131685754774712613cf30a23c2e8e504d41688d484561f3641a86cbe57c3d7
MD5 08ce50c5ac9693323aa3f0f02fe5ea0a
BLAKE2b-256 7031f8ca961de296317a556bbdb5d3d367cbd2792386e8a0ffe753a28b8673e2

See more details on using hashes here.

File details

Details for the file pypi_cleanup-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypi_cleanup-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for pypi_cleanup-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c74e02a79d70d04ce13752c907d36de50909fcc3ee2a3360921c0c7000e0beee
MD5 a75c3aa7e010a0c338ae09a0534b436e
BLAKE2b-256 f5ba048110b42b28388a2ed3f7538e732ef92c050713147caf317dc27a133636

See more details on using hashes here.

Supported by

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