almost 4 years ago

Pyreverse 是一套繪製 UML class diagrams 及 package dependancy 的工具,目前已被整進 pylint

Requirement

  1. graphviz
  2. pylint (By pip)

使用方法

$ pyreverse -o [format] -p [file_name] [parsed_file]

format 會受限於 graphviz 能支援的格式,跟你當初編譯時有關,可以使用下列指令來作測試:

$ dot -Txxx

例子

$ pyreverse -o png -p my_module_base my_module_base/base.py

其他參數

-a N, -A    depth of research for ancestors
-s N, -S    depth of research for associated classes
-A, -S      all ancestors, resp. all associated
-m[yn]      add or remove the module name
-f MOD      filter the attributes : PUB_ONLY/SPECIAL/OTHER/ALL
-k          show only the classes (no attributes and methods)
-b          show 'builtin' objects

參考資料

Pyreverse : UML Diagrams for Python

← Introduction to Docker Lambda Calculus Study Note →
 
comments powered by Disqus