用于查询系统上安装的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 Spring使用XML配置重试DAO调用   javasocket编程:消息传递顺序   Java ArrayList从两个列表中删除重复项   java在安卓中每次从数组中获取唯一的编号   java为什么collect方法中的双消费者组合器代码永远无法到达?   java类型实例化和声明在同一行   如何在Java应用程序中获取映射网络驱动器的UNC路径   Javascript(GraalJS)与Java中未签名的右移>>>>   xml Java SAX ContentHandler为每个根节点创建新对象   模拟类的java问题   JavaWebapplet可以和离线applet做同样的事情吗?   在Java中设置Windows系统路径   如何导入jwt。io Java库到JMeter   java Simple Kafka消费者未接收消息   带有GoogleAPI错误的Java Jsoup:状态503   java是否可以通过google plus SignIn检索用户信息而不包括google脚本   Java3D洪水填充