Make a relation diagram of Python module

Introduction

Create a relationship diagram between modules for refactoring. I want to draw a module dependency diagram in Python or [Python dependencies inside a package](http://stackoverflow.com/questions/20829697/python-dependencies- According to inside-a-package) snakefood seemed to be good, so I tried using it.

snakefood Can be installed with pip.

$ pip install snakefood 

Some commands are provided, You can parse with sfood and write out a dot file for Graphviz with stood-graph.

If the root of the package you want to parse is ROOT

$ sfood ROOT | sfood-graph > graph.dot

Since graph.dot is created with, the rest is plotted appropriately.

$ dot -Tjpg graph.dot -o graph.jpg -Gdpi=800

If there are many modules, the resolution (-Gdpi option value) must be set large or it will be crushed and unreadable. If you want to output other than jpg, you can use -Tpng etc.

If you add the -i option to sfood, you can omit the external package.

sample

For reference, the results of the trial at selenium are posted.

selenium.jpg

Other

According to How to read pyreverse results and how to use options, pyreverse It seems that you can also use a tool called /pyreverse/0.5.1).

Recommended Posts

Make a relation diagram of Python module
Create a Python module
Make a copy of the list in Python
Make a joyplot-like plot of R in python
[Python] A rough understanding of the logging module
Let's make a module for Python using SWIG
Try to make a Python module in C language
Make a copy of a Google Drive file from Python
Automatic update of Python module
Make a bookmarklet in Python
Make a fortune with Python
[Python] How to make a list of character strings character by character
Make the display of Python module exceptions easier to understand
Make a table of multiplication of each element in a spreadsheet (Python)
A record of patching a python package
A brief summary of Python collections
python / Make a dict from a list.
[Python] Make the function a lambda function
Make a recommender system with python
Use blender as a python module
Let's make a graph with python! !!
Draw a CNN diagram in Python
I tried to make a regular expression of "amount" using Python
I tried to make a regular expression of "time" using Python
I tried to make a regular expression of "date" using Python
[Python] How to make a matrix of repeating patterns (repmat / tile)
The story of making a module that skips mail with python
Create a compatibility judgment program with the random module of python.
Let's make a shiritori game with Python
Pass the path of the imported python module
Try to make a kernel of Jupyter
Display a list of alphabets in Python 3
Comparison of Japanese conversion module in Python3
Connect a lot of Python or and and
Let's make a voice slowly with Python
Make Qt for Python app a desktop app
Check the path of the Python imported module
[python] Get a list of instance variables
[python] [meta] Is the type of python a type?
Let's make a web framework with Python! (1)
Let's make a combination calculation in Python
The story of blackjack A processing (python)
Make a desktop app with Python with Electron
Let's make a Twitter Bot with Python!
[Python] Get a list of folders only
Let's make a web framework with Python! (2)
A memorandum of python string deletion process
If you want a singleton in python, think of the module as a singleton
[Python] How to read a csv file (read_csv method of pandas module)
Error when installing a module with Python pip
A memo of a tutorial on running python on heroku
[AtCoder] Solve A problem of ABC101 ~ 169 with Python
Draw a graph of a quadratic function in Python
Introduction of Python
Make a Twitter trend bot with heroku + Python
[Python] Make a game with Pyxel-Use an editor-
Python module import
I tried to make a simple mail sending application with tkinter of Python
[python] Create a list of various character types
Get the caller of a function in Python
A memorandum of calling Python from Common Lisp