Retrieve and print Python package dependencies.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
src/depinfo
tests
.editorconfig
.gitattributes
.gitignore
.travis.yml
HISTORY.rst
LICENSE
MANIFEST.in
README.rst
pyproject.toml
setup.cfg
setup.py
tox.ini
versioneer.py

README.rst

Package Dependency Information

Current PyPI Version Travis CI Codecov

Supported Python Versions

A utility Python package intended for other library packages. Provides a function that when called with your package name, will print platform and dependency information.

Install

It's as simple as:

pip install depinfo

Usage

The easiest way is to implement the following in your package somewhere.

from depinfo import print_dependencies


def show_versions():
    print_dependencies("your-package-name")

That's all there is to it.

If instead you want to access and modify the information, you can make use of the underlying functions that return dictionaries that map package names to their current versions. By default it will include common build packages such as pip.

from depinfo import get_pkg_info
help(get_pkg_info)

Example

from depinfo import print_dependencies
print_dependencies("depinfo")
System Information
==================
OS                     Linux
OS-release 4.4.0-122-generic
Python                 3.6.5

Package Versions
================
pip        10.0.1
pipdeptree 0.12.1
setuptools 39.0.1
wheel      0.31.0

Copyright