允许从devpi服务器批量删除包。
devpi-cleaner的Python项目详细描述
devpi清洁剂
devpi清洁器léon支持从devpi server中批量移除人工制品。给定包和版本 规范,它将从给定的单个索引或所有索引中删除包的指定版本。 用户。
基本原理
devpi cleaner包装原始的devpi remove命令。它提供以下扩展:
- 有条件地限制对开发包的删除。
- 有条件地将删除限制为与给定正则表达式匹配的版本。
- 暂时将非易失性指数切换为易失性指数。
- 对用户的所有索引应用删除操作。
举例来说,Léon
下面的命令将删除indexindex1的delete_me版本0.2之前的所有开发包 用户:
> devpi-cleaner http://localhost: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.2.0-2016-04-08
已添加
- 允许清除单个索引而不是用户的所有索引。有关调用语法,请参见--help。
- 允许通过正则表达式限制要删除的版本。
- 如果选择了多个包或包版本,则在执行删除时显示进度条。
- 现在正式支持Python3.5
- pypy现在得到官方支持
已更改
- 提示用户提供要从中删除的包版本和索引的列表。以前用户是 显示了包URL的列表。但是,devpi_cleaner实际上将按包版本删除,而不是按上载的文件删除。
- 在从非易失性索引中删除多个包版本时提高了性能
- 变更日志现在以http://keepachangelog.com/建议的格式维护。
已删除
- 不再支持Python3.2
版本0.1.1-2015-11-23
已添加
- 添加对https的支持。
版本0.1.0-2015-07-17
已添加
- 从devpi用户的所有索引中批量删除包
- 允许将删除限制为开发版本
- 允许从非易失性索引中删除包
- 非交互式操作的批处理模式