Skip to content
This Python module generates a Graphviz-compatible formatted graph that represents the type hierarchy of all the classes in the specified Python modules
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
output.svg
type_to_graphviz.py

README.md

Python Type-Hierarchy to Graphviz Generator

This Python module generates a Graphviz-compatible formatted graph that represents the type hierarchy of all the classes in the specified Python modules.

Tested on Python 3.7 only.

Usage

import type_to_graphviz

# Generate a type hierarchy graph for built in classes only.
type_to_graphviz.generate_graphviz(__builtins__)

# Generate a type hierarchy graph for built in classes and for the collections
# and abstract collections modules.
import collections
type_to_graphviz.generate_graphviz(__builtins__, collections, collections.abc)

Save the output to a file or copy and paste it into an online Graphviz renderer such as WebGraphviz.

Executing the file directly will generate a graph for built in classes, and the collections, collections.abc, and datetime modules.

Sample graph

You can’t perform that action at this time.