跳转到主要内容

一个检查软件包更新的Python模块。

项目描述

Build Status

update_checker

一个检查软件包更新的Python模块。

只有列入白名单的软件包才能检查更新。有关将软件包添加到白名单的信息,请联系update_checker的作者。

安装

可以通过以下方式安装update_checker模块

pip install update_checker

用法

要简单地输出当有新版本的praw软件包时,可以使用以下代码片段

from update_checker import update_check
update_check('praw', '0.0.1')

如果您需要更多控制,例如在更新时进行条件操作,可以使用以下方法

from update_checker import UpdateChecker
checker = UpdateChecker()
result = checker.check('praw', '0.0.1')
if result:  # result is None when an update was not found or a failure occured
   # result is a UpdateResult object that contains the following attributes:
   # * available_version
   # * package_name
   # * running_version
   # * release_date (is None if the information isn't available)
   print(result)
   # Conditionally perform other actions

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装软件包的更多信息。

源分发

update_checker-0.18.0.tar.gz (6.7 kB 查看哈希值)

上传时间 源代码

构建版本

update_checker-0.18.0-py3-none-any.whl (7.0 kB 查看哈希值)

上传时间 Python 3

支持者