从pypi获取包信息和/或操作需求的cli工具。

whatsonpypi的Python项目详细描述


Whatsonpypi

https://img.shields.io/pypi/v/whatsonpypi.svghttps://img.shields.io/travis/viseshrp/whatsonpypi.svgDocumentation StatusDownloads

从pypi获取包信息和/或操作需求的cli工具。

安装

pip install -U whatsonpypi

要求

  1. 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

学分

历史记录

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上的第一个版本。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java程序运行时错误   JavaAndroidStudio:与往常一样,四舍五入到next.5或.0   apache使用Java以表单数据形式上载文件   带矢量的java Freeflight相机如何正确旋转?   java如何以编程方式检索有关当前项目的语言、操作系统、体系结构等信息   java Twitter4J tweet实体?   java PdfBox编码异常   java在拖动未装饰的舞台时,如何强制光标停留在窗口上   JavaSpring注释扫描优化   java无法通过IntelliJ Idea在tomcat上运行服务   java在生命周期中如何拦截请求?   java中的数组返回错误