Skip to main content

Display module dependencies

Project description

Python Dependency visualization. This package installs the pydeps, and normal usage will be to use it from the command line.

To create graphs you need to install Graphviz (make sure the dot command is on your path).

This is the result of running pydeps on itself (pydeps --show pydeps):

https://dl.dropboxusercontent.com/u/94882440/pydeps.svg

An attempt has been made to keep the intermediate formats readable, eg. the output from pydeps --show-deps .. looks like this:

...
"pydeps.mf27": {
    "imported_by": [
        "__main__",
        "pydeps.py2depgraph"
    ],
    "kind": "imp.PY_SOURCE",
    "name": "pydeps.mf27",
    "path": "pydeps\\mf27.py"
},
"pydeps.py2depgraph": {
    "imported_by": [
        "__main__",
        "pydeps.pydeps"
    ],
    "imports": [
        "pydeps.depgraph",
        "pydeps.mf27"
    ],
    "kind": "imp.PY_SOURCE",
    "name": "pydeps.py2depgraph",
    "path": "pydeps\\py2depgraph.py"
}, ...

Usage:

usage: pydeps-script.py [-h] [-v] [-o file] [-T FORMAT] [--show] [--show-deps]
                        [--show-dot] [--debug] [--pylib] [--pylib-all]
                        [-x EXCLUDE [EXCLUDE ...]]
                        fname

positional arguments:
  fname                 filename

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         be more verbose (-vv, -vvv for more verbosity)
  -o file               write output to 'file'
  -T FORMAT             output format (svg|png)
  --show                call external program to display graph
  --show-deps           show output of dependency analysis
  --show-dot            show output of dot conversion
  --debug               turn on all the show and verbose options
  --pylib               include python std lib modules
  --pylib-all           include python all std lib modules (incl. C modules)
  -x EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]
                        input files to skip

You can of course import pydeps from Python (look in the tests/test_relative_imports.py file for examples.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydeps-0.9.0.zip (21.6 kB view hashes)

Uploaded Source

Built Distributions

pydeps-0.9.0.win32.exe (326.6 kB view hashes)

Uploaded Source

pydeps-0.9.0-py2-none-any.whl (20.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page