Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tanbro/pipdot

Generate a graphviz dot file representing installed PyPI distributions
https://github.com/tanbro/pipdot

dependency dependency-graph distribution graph graphviz graphviz-dot package pip pypi pypi-package

Last synced: about 1 month ago
JSON representation

Generate a graphviz dot file representing installed PyPI distributions

Awesome Lists containing this project

README

        

# pipdot

[![GitHub](https://img.shields.io/github/license/tanbro/pipdot)](https://github.com/tanbro/pipdot)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/tanbro/pipdot)](https://github.com/tanbro/pipdot/tags)
[![PyPI](https://img.shields.io/pypi/v/pipdot)](https://pypi.org/project/pipdot/)
[![PyPI - Status](https://img.shields.io/pypi/status/pipdot)](https://pypi.org/project/pipdot/)
[![PyPI - License](https://img.shields.io/pypi/l/pipdot)](https://pypi.org/project/pipdot/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pipdot)](https://pypi.org/project/pipdot/)
[![docker build](https://github.com/tanbro/pipdot/actions/workflows/docker-build.yml/badge.svg)](https://github.com/tanbro/pipdot/actions/workflows/docker-build.yml)
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/liuxueyan/pipdot/latest)](https://hub.docker.com/repository/docker/liuxueyan/pipdot)

Generate a [GraphViz][] `dot` file representing installed [PyPI][] distributions.

## Install

```bash
pip install pipdot
```

It's a zero-dependency package.

## Usage

When installed, we can execute the program as:

- either a standard-along command:

```bash
pipdot
```

- or a python module:

```bash
python -m pipdot
```

To generate a [GraphViz][] `dot` file for distributions of current Python environment:

```bash
pipdot --extras-label 1.dot
```

Then convert it to a `svg` (or other formats) image:

```bash
dot -T svg -O 1.dot
```

We'll get something like:

![assets/1.dot.svg](assets/1.dot.svg)

And we can use it by docker, eg:

```bash
docker run -it --rm -v "your-python-site-dir:/work" -w /work liuxueyan/pipdot -p .
```

For help messages, execute:

```bash
python -m pipdot --help
```

[PyPI]: https://pypi.org/
[pip]: https://pip.pypa.io/
[GraphViz]: https://graphviz.org/