允许批量从devpi服务器删除包。
项目描述
Devpi Cleaner
Léon,devpi清理器,允许批量从devpi服务器删除工件。给定一个包和版本规范,它将从单个索引或指定用户的所有索引中删除指定版本的包。
理由
devpi清理器封装了原始的devpi remove命令。它提供了以下扩展
有条件地限制删除为开发包。
有条件地限制删除与给定正则表达式匹配的版本。
临时将非持久索引切换为易失性。
将删除操作应用于用户的全部索引。
如果Devpi服务器难以跟上,则限制删除活动。
Léon示例
以下命令将从用户index1中删除版本0.2之前的所有delete_me开发包
> devpi-cleaner https://:2414/ user/index1 'delete_me<=0.2' --dev-only Password: Packages to be deleted from user/index1: * delete_me 0.2.dev1 on user/index1 * delete_me 0.2.dev2 on user/index1 Cleaning user/index1… 100% (2 of 2) |###########################| Elapsed Time: 0:00:00 Time: 0:00:00 >
如所示,在实际上从服务器删除之前,将列出包并要求确认。
命令行使用
usage: devpi-cleaner [-h] [--batch] [--dev-only] [--version-filter REGEX] [--force] [--password PASSWORD] [--login LOGIN] server user[/index] package_specification A utility to batch-remove packages from a Devpi server. positional arguments: server The devpi server to operate on. user[/index] The index from which to remove the packages. If only the user part is specified, all indices of that user will be cleaned. package_specification The specification of the package version(s) to remove. optional arguments: -h, --help show this help message and exit --batch Assume yes on confirmation questions. --dev-only Remove only development versions as specified by PEP 440. --version-filter REGEX Remove only versions in which the given regular expression can be found. --force Temporarily make indices volatile to enable package removal. --password PASSWORD The password with which to authenticate. --login LOGIN The user name to user for authentication. Defaults to the user of the indices to operate on. The arguments --dev-only and --version-filter can be combined. In this case only packages passing both filters will be removed.
许可
变更日志
这是devpi_cleaner的版本历史。
版本 0.3.0 - 2021-02-05
新增
如果Devpi似乎负载过重,则限制删除。
现在正式支持Python 3.6到3.9。
删除
不再支持Python 2.7和3.3到3.5。
版本 0.2.0 - 2016-04-08
新增
允许清除单个索引,而不是用户的全部索引。请参阅 --help 了解调用语法。
允许通过正则表达式限制要删除的版本。
在执行删除操作时,如果选择了多个包或包版本,将显示进度条。
现在官方支持 Python 3.5
现在官方支持 PyPy
已更改
提示用户输入要删除的包版本及其索引列表。以前用户会看到包 URL 列表。然而,devpi_cleaner 实际上是按包版本删除,而不是按上传文件。
从非持久索引中删除多个包版本时,性能得到改善
变更日志现在以 http://keepachangelog.com/ 建议的格式维护。
删除
Python 3.2 不再受支持
版本 0.1.1 - 2015-11-23
新增
添加对 HTTPS 的支持。
版本 0.1.0 - 2015-07-17
新增
批量从 Devpi 用户的全部索引中删除包
允许限制删除到开发版本
启用从非持久索引中删除包
批量模式用于非交互式操作