Getting information about distributions

Displaying installed distributions as lists

You can use distil list to see information about installed distributions:

$ distil list
MarkupSafe     0.15
lxml           2.3.5
protobuf       2.4.1
defer          1.0.6
configglue     1.0
dirspec        4.0.0
Mako           0.7.1
zope.interface 3.6.1
feedparser     5.1.2
python-debian  0.1.21-nmu2ubuntu1
debtagshw      0.1
oauth          1.0.1

This display is roughly equivalent to pip freeze. If you want a more verbose display, you can specify -v:

$ distil -v list
MarkupSafe     0.15*
lxml           2.3.5*
protobuf       2.4.1*
defer          1.0.6*
configglue     1.0*
dirspec        4.0.0*
Mako           0.7.1*
zope.interface 3.6.1*
feedparser     5.1.2*
python-debian  0.1.21-nmu2ubuntu1*
debtagshw      0.1*
oauth          1.0.1*
* These are distutils/setuptools/distribute distributions

If you want to see whether there are any more recent versions of installed distributions, specify --latest (which needs -v specified as well):

$ distil -v list --latest
MarkupSafe     0.15*
lxml           2.3.5               (latest: 3.1.0)*
protobuf       2.4.1               (latest: 2.5.0)*
defer          1.0.6*
configglue     1.0                 (latest: 1.0.3)*
dirspec        4.0.0               (latest: 4.1.90)*
Mako           0.7.1               (latest: 0.7.3)*
zope.interface 3.6.1               (latest: 4.0.5)*
feedparser     5.1.2               (latest: 5.1.3)*
python-debian  0.1.21-nmu2ubuntu1*
debtagshw      0.1*
oauth          1.0.1*
* These are distutils/setuptools/distribute distributions

Command line reference – distil list

Here is the complete help for distil‘s list command:

$ distil help list
usage: distil list [-h] [-l] [DIST [DIST ...]]

List one or all installed distributions.

positional arguments:
  DIST          The name of an installed package. If not specified, all
                packages are listed.

optional arguments:
  -h, --help    show this help message and exit
  -l, --latest  show latest versions

Displaying dependency graphs as lists

The graph command of distil is used to display dependencies of a distribution as a topologically sorted list:

$ distil graph pyramid
translationstring (1.1) [for pyramid]
setuptools (2.1) [for zope.interface, zope.deprecation, pyramid]
Chameleon (2.14) [for pyramid]
PasteDeploy (1.5.2) [for pyramid]
venusian (1.0a8) [for pyramid]
repoze.lru (0.6) [for pyramid]
MarkupSafe (0.18) [for Mako]
WebOb (1.3.1) [for pyramid]
zope.interface (4.0.5) [for pyramid]
zope.deprecation (4.1.0) [for pyramid]
Mako (0.9.1) [for pyramid]
pyramid (1.4.5)

Displaying dependency graphs as images

You can use the --image parameter to distil‘s graph command to produce images through the GraphViz package, specifically the dot command which it includes:

$ distil graph --image flask-sqlalchemy | dot -T png > depend-1.png

This produces the following image:

http://i.imgur.com/QjC0F9Y.png

Displaying dependency graphs in requirements file format

You can use the -r parameter to distil‘s graph command to produce the dependency list in requrirements file format:

$ distil graph -r pyramid
translationstring == 1.1
setuptools == 2.1
Chameleon == 2.14
PasteDeploy == 1.5.2
venusian == 1.0a8
repoze.lru == 0.6
MarkupSafe == 0.18
WebOb == 1.3.1
zope.interface == 4.0.5
zope.deprecation == 4.1.0
Mako == 0.9.1

Command line reference – distil graph

Here is the complete help for distil‘s graph command:

$ distil help graph
usage: distil graph [-h] [-i] REQT

Show the dependency graph for a distribution.

positional arguments:
  REQT         A requirement identifying a distribution.

optional arguments:
  -h, --help     show this help message and exit
  -i, --image    Produce output suitable for GraphViz
  --prereleases  Include pre-releases when downloading. By default, pre-
                 releases are skipped, unless they are all that is available.
  -r             Show in requirements file format