用于查询系统上安装的pypi和python包的命令行工具。

yolk的Python项目详细描述


Installation

您可以使用pip install yolk或通过发行版的包管理器(如果可用)安装yolk。

从0.0.7开始,yolk作为dev python/yolk和一个名为dev python/yolk portage的移植插件出现在gentoo的移植树中。portage插件显示哪些python包是通过portage安装的,哪些是直接用pip(或easy_install)安装的。看看那个插件,为你最喜欢的发行版做一个。这是一个很好的方法找到Python克鲁夫特。

Summary

yolk是一个python工具,用于获取有关已安装的python包的信息,并在pypi(python包索引)上查询可用的包。

您可以通过查询pypi来查看哪些包是活动的、非活动的或处于开发模式中的,并显示哪些包具有较新的可用版本。

用法示例:

$ yolk -l
     List all installed Python packages

$ yolk -a
     List only the activated packages installed (Activated packages are normal packages on sys.path you can import)

$ yolk -n
     List only the non-activated (--multi-version) packages installed

$ yolk -l -f License,Author nose==1.0
     Show the license and author for version 1.0 of the package `nose`

$ yolk --entry-map nose
     Show entry map for the nose package

$ yolk --entry-points nose.plugins
     Show all setuptools entry points for nose.plugins

这些选项查询pypi:

$ yolk -U pkg_name
     Shows if an update for pkg_name is available by querying PyPI

$ yolk -U
     Checks PyPI to see if any installed Python packages have updates available.

$ yolk -F Paste
     Download source tarball for latest version of Paste to your current directory

$ yolk -F Paste -T svn
     Do a subversion checkout for Paste to a directory named Paste_svn in your current directory.

$ yolk -L 2
     Show list of CheeseShop releases in the last two hours

$ yolk -C 2
     Show detailed list of changes in the CheeseShop in the last two hours

$ yolk -M Paste==1.0
     Show all the metadata for Paste version 1.0

$ yolk -M Paste
     Show all the metadata for the latest version of Paste listed on PyPi

$ yolk -D cheesecake
     Show all (source, egg, svn) URL's for the latest version of cheesecake packages

 $ yolk -T source -D cheesecake
     Show only source code releases for cheesecake

 $ yolk -H twisted
     Launches your web browser at Twisted's home page

Tips and Tricks

  • Use yolk inside your virtualenv to see which packages are installed.
  • Upgrade all installed Python packages:

Warning: You only want to do this inside a virtualenv. If you’re using Linux, use your package manager to install Python packages globally whenever possible. Think twice before upgrading all packages system-wide on OSX.

$ pip install -U yolk -U | awk ‘{print $1}’

Changes

0.4.3:添加了缺少的文档和许可文件

0.4.2:在未提供整数时修复-c

Fix for –entry-map from Jesus Rivero (Neurogeek) neurogeek@gentoo.org. Thanks, Jesus!

Switch to BSD license from GPL-2

0.4.1:修复-f字段

Add check for integer with -L

0.4.0:添加了对xml-rpc的http代理支持

Added case-insensitive search for -f

Non-existent packages with -S no longer show entire index (bug was with PyPI)

Fixed exception when package has no metadata

0.3.0:为新的pypi xml-rpc方法添加了-c和-l选项

Always check package name cache on disk before querying PyPi to see if a package exists and has proper case.

Added -F option to download source, egg or subversion checkouts.

Removed -L RSS feed option because the new updated_releases XML-RPC method is much nicer

Fixed ‘-D -T egg’ so it won’t return source if no egg is available

Major refactoring.

Removed dependency on elementtree

0.2.0:为-t添加了'svn'类型

A kablillion bug fixes

0.1.0:现在可以将-f与-m一起使用

More accurate URL’s with -D using pip

Ability to check for a single package with -U

Uses std Python logging module

Fixed bug so we have correct exit codes

0.0.7:新选项:–入口地图和-入口点

Improved results with –download-links

New plugin system. First plugin available: yolk-portage for Gentoo Linux.

-v option is now –version

-v is now a new option: –verbose

Many bug fixes.

0.0.6:修复显示所有pkg处于开发模式的windows问题 在某些系统上。

修复rss-feed.py示例中的错误解释器shebang

从setup.py开始使用nose单元测试

在docstrings中使用structuredtext

0.0.5:显示以“开发”模式安装的包。

Improved output of -l, -n and -a. You can get the previous (<=0.0.4) output by adding ‘-f Summary’

More sanity checking for various options.

Don’t throw exception if there is no package metadata

0.0.4:添加了-u选项以查询pypi是否有新版本的包
已安装

Requirements

  • 设置工具(首选分发)
  • elementtree(对于rss提要选项extra_需要[rss])(包含在python>;=2.5中)

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

推荐PyPI第三方库


热门话题
java有没有办法使多个对象初始化更紧凑?   java确保BUnit包和测试包不包含在生产代码中   java如何使JTextField更小,而不是填满整个空间?   javaawt的矩形交点   用户连续登录应用程序的java条纹(Android)   maven如何在服务器上运行java项目,并将其作为jar添加到EAR项目中   java如何在jar/war的资源文件夹中创建png?   swing在Java中未选择列表项时禁用按钮   java GridView x BaseAdapter并在onItemClick中重新加载   java Apache POI未应用某些颜色索引   java创建URL使用uri有什么区别。解析/uri。生成器/连接字符串?   java JavaFX jfoenix运行时错误(JFXDatePicker)   右旋转二叉搜索树   在Java标准版中运行Java移动应用程序   java为什么要为每个实例创建静态hashmap?   java如何使用RTC唤醒和报警意图   java获取对象中的JSON表达式   (Java)服务器不接受多个连接   java为什么我的目的地为null?   java使用多个参数执行存储过程,并使用spring数据jpa将结果集映射到非实体类