用Go写的一个检查Python依赖包最新版本命令行工具

2020-11-29 · xiejiahe

用Go写的一个检查Python依赖包最新版本命令行工具

全称 python-check-updates 简称 pcu

为什么用 Go 写

主要原因是 Go 非常适合写工具类,因为不需要安装环境即可运行,加上更快,体积也小。

项目开源戳 https://github.com/xjh22222228/python-check-updates

这个项目只是用来玩的,直接用 pip 更好。

PCU

Find the latest version of your requirements.txt current dependency package.

Installation

Deno ships as a single executable with no dependencies. You can install it using the installers below, or download a release binary from the releases page.

Shell (Mac, Linux):

curl -fsSL https://raw.githubusercontent.com/xjh22222228/python-check-updates/main/install.sh | bash

Usage

Show any new dependencies for the project in the current directory:

$ pcu
Checking /opt/requirements_test.txt
13 / 13 [--------------------------] 100.00% 1 p/s
 pytest-cov                                       →   2.10.1
 pytest-mock                           ==2.0.0    →    3.3.1
 httpbin                               ==0.7.0    →    0.7.0
 pytest-httpbin                           <1.0    →    1.0.0
 MySQL-python                          ==1.2.5    →    1.2.5
 aliyun-python-sdk-cdn                 ==2.3.1    →    3.5.8
 XlsxWriter                            ==0.9.3    →    1.3.7
 aliyun-python-sdk-core                ==2.3.2    →  2.13.29
 wheel                                            →   0.35.1
 service-identity                     ==16.0.0    →   18.1.0
 pytest                       >=2.8.0,<=3.10.1    →    6.1.2
 zope.interface                        ==4.3.2    →    5.2.0

Done in  1 s.

Options

-f, --file                   Specify the file name of the check dependency
 package, default 'requirements.txt'
-v, --version                output the version number
-c, --check                  Check the latest version
-h, --help                   display help for command

Example

$ pcu -f=requirements_test.txt

$ pcu -v
Golang
原创文章,转载请注明出处。