从pypi获取包信息和/或操作需求的cli工具。
whatsonpypi的Python项目详细描述
Whatsonpypi
从pypi获取包信息和/或操作需求的cli工具。
- github:https://github.com/viseshrp/whatsonpypi
- PYPI:https://pypi.python.org/pypi/whatsonpypi
- 自由软件:麻省理工学院许可证
- 文档:https://whatsonpypi.readthedocs.io。
安装
pip install -U whatsonpypi
要求
- Python2.7+
功能
在pypi上查找有关包的信息
Examples:
$ whatsonpypi django NAME Django LATEST VERSION 2.1.5 SUMMARY A high-level Python Web framework that encourages rapid development and clean, pragmatic design. PACKAGE URL https://pypi.org/project/Django/ AUTHOR Django Software Foundation LATEST RELEASES 2.2a1, 2.1rc1, 2.1b1, 2.1a1, 2.1.5
更多信息…
Examples:
$ whatsonpypi django --more ...
版本特定信息..
Examples:
$ whatsonpypi django==2.1.4 --more ...
在浏览器选项卡中启动项目的文档URL
Examples:
$ whatsonpypi django --docs
将包添加到需求文件中。
Examples:
$ whatsonpypi django --add
By default, it searches for files with names matching ^{tt1}$ in the current working directory and adds the dependency to the end of the file.
You can change the filename pattern to search for. The pattern may contain simple shell-style wildcards.
$ whatsonpypi django --add --req-pattern "*.txt"
If there’s more than one file, you will see a prompt allowing you to select the files that should be modified.
If you want the dependency to be added to a specific line, mention a comment ^{tt2}$ on its own line, which will be replaced with the dependency:
Example:
Do this in your requirements.txt:
# Djangodjango==2.1.5# testingpytest==4.1.1#wopp
Then running this:
$ whatsonpypi pytest-runner --add
will produce this:
# Djangodjango==2.1.5# testingpytest==4.1.1pytest-runner==4.2
Existing dependencies will be replaced with newer versions. Dependency version by default is the latest unless specified explicitly like:
$ whatsonpypi pytest-runner==4.1 --add
Optionally, directory to search for requirement files can be specified with ^{tt3}$. Both absolute and relative paths are allowed. Must be a directory.
$ whatsonpypi pytest-runner==4.1 --add --req-dir /Users/Me/Documents/GitHub/project/requirements
Default value (if not provided) is the directory where the command is run (cwd).
Also, optionally, you can specify comments to add before a dependency. Note that the comment will not be added if the dependency already exists in the file.
For example, running this:
$ whatsonpypi pytest-runner --add --comment 'testing'
will add this:
# testingpytest-runner==4.2
使用以下选项查看所有选项:
$ whatsonpypi --help
学分
- Cookiecutter和audreyr/cookiecutter-pypackage项目模板,用于启动我。
历史记录
0.2.7(2019-02-12)
- 修复PY2重要错误
0.2.6(2019-02-06)
- 修复缺少新行的问题
0.2.5(2019-02-05)
- 修复要求文件格式检查
0.2.4(2019-01-29)
- add–comment允许使用–add提及评论
0.2.3(2019-01-26)
- add–req pattern允许为需求文件指定搜索模式
- 未找到需求文件时引发错误
0.2.2(2019-01-23)
- 修复空依赖项显示
0.2.1(2019-01-23)
- 小修补程序
0.2.0(2019-01-22)
- add-a/–add启用将包添加到需求文件。
- 添加了-d/–docs以在浏览器中启动docs url
- 允许特定于版本的查询
0.1.2(2019-01-20)
- 显示更多套餐信息
- 添加–更多/-m以获取更多信息
0.1.1(2019-01-02)
- pypi上的第一个版本。