Skip to main content

Command line interface for analyzing Python imports.

Project description

https://img.shields.io/pypi/v/impulse.svg Python versions https://api.travis-ci.com/seddonym/impulse.svg?branch=master
  • Free software: BSD license

Impulse is a command line tool for exploring the imports in a Python package.

It can be used to produce dependency graphs such as this:

Graph of flask package.

Installation

Install Graphviz

First, you will need to install Graphviz. For more information, see the Graphviz download page or search for “how to install Graphviz” on your operating system.

Install Impulse

pip install impulse

Install the Python package you wish to analyse

pip install somepackage

Command overview

There is currently only one command, feel free to suggest more by opening an issue or pull request.

drawgraph

Draw a graph of the dependencies within any installed Python package or subpackage.

The graph shows the relationship between all the immediate children of the package. An arrow indicates that there is at least one import by the child (or any of its descendants) from the subpackage where the arrow points.

For example, in a graph of the package django.db, there is an arrow from django.db.backends pointing to django.db.models. This is because django.db.backends.base.schema imports django.db.models.Index. All descendants are treated as belonging to the child they are in, so an import between any of those descendants will cause an import to be shown.

Command:

impulse drawgraph django.db

Output:

Graph of django.db package.

Project details


Download files

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

Source Distribution

impulse-1.0.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file impulse-1.0.tar.gz.

File metadata

  • Download URL: impulse-1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for impulse-1.0.tar.gz
Algorithm Hash digest
SHA256 6fed3f2acd2a2055b697e4bd60202443b31632daad42572b4d2af9e1dd6f910c
MD5 0ee94fa32d2c06f98c32c80de88c3f61
BLAKE2b-256 367d38fc9b8e5a79ff439656640c4ca441c3ad2a7b594a18a4053911aae45d39

See more details on using hashes here.

Provenance

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