PyPI Bulk Release Version Cleanup Utility
Project description
PyPI Bulk Release Version Cleanup Utility
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 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pypi-cleanup-0.0.1.tar.gz
.
File metadata
- Download URL: pypi-cleanup-0.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8507973350f81c1b99906b15aeefd9498c0bd175535b7f8d8a0262c3e417adc0 |
|
MD5 | e5bb9db14bed9372e2ecc3d1adaf4e87 |
|
BLAKE2b-256 | ad971263072481b86412737edfb35b9d584acdf98c8d1dc8e8a50cb1cd4f0a97 |
File details
Details for the file pypi_cleanup-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pypi_cleanup-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b25ca6a3e6cd9021dc1498091c86c3463682ebee1d2004e9451062ae576ab22 |
|
MD5 | dbd4db426e067915aef48b026574eccf |
|
BLAKE2b-256 | e96991f89be4871a22eee27f1780dfac6850da94cc0dbf261cee0ecce8cbbd37 |