1PYREVERSE(1)                     User's Manual                    PYREVERSE(1)
2
3
4

NAME

6       pyreverse - parse python sources files and extract diagrams from them.
7
8

SYNOPSIS

10       pyreverse [options] <modules>
11
12

DESCRIPTION

14       pyreverse  is a python source analyzer. It parses a python packages and
15       produces UML diagrams in different output formats.  (dot,  all  formats
16       available for dot, and vcg).  With different options, you can have fine
17       tuning on what and how modules, classes and attributes will be shown in
18       the  diagram.   You  can combine several modules in one project (except
19       with -c ).
20
21       If no -c and no --diadefs option specified, pyreverse will create
22        - a diagram 'classes_<name>' for the classes in <modules> and
23          ( if there is more than one module in <projects> )
24        - a diagram 'packages_<name>' for the package  dependencies  in  <mod‐
25       ules>
26
27       With  -c  <class>,  pyreverse  creates  a diagram for that <class> with
28       filename <class>.<format>.  You can do -c <class1> , -c <class2>.
29
30

OPTIONS

32       -h, --help
33              show this help message and exit
34
35       -p<name>, --project=<name>
36              set project name to <name> if not using -c option.  (default:'No
37              Name')
38
39       -i<file>, --ignore=<file>
40              add <file> (may be a directory) to the black list (not parsed)
41
42       -f<mode>, --filter-mode=<mode>
43              filter  attributes  and  functions  according to <mode>. You can
44              combine modes using '+' like 'SPECIAL+OTHER'. Correct modes  are
45              :
46               - 'PUB_ONLY' : filter all non public attributes (default)
47               - 'ALL' : no filter
48               -  'SPECIAL' : filter Python special functions except construc‐
49              tor
50               - 'OTHER' : filter protected and private attributes  [currentt:
51              PUB_ONLY]
52
53
54       -d<file>, --diadefs=<file>
55              create diagram according to the diagrams definitions in <file>
56
57       -c <class>, --class=<class>
58              create  a  class  diagram  with  all  classes related to <class>
59              [current: none] the class must be  in  the  file  <modules>.  By
60              default,  this will include all ancestors and associated classes
61              of <class> and include module names (i.e. '-ASmy' ).
62
63
64       -a <ancestor>, --show-ancestors=<ancestor>
65              show  <ancestor>  generations  of  ancestor   classes   not   in
66              <projects>
67
68       -A, --all-ancestors=[yn]
69              show all ancestors off all classes in <projects> [current: none]
70
71       -s <ass_level>, --show-associated=<associated>
72              show  <ass_level>  associated  classes.  <ass_level>=1 will only
73              take classes directly related to the classes   in  the  project,
74              while  <ass_level>=2 will also take all classes related to those
75              fetched by<depth>=1.
76
77       -S, --all-associated=[yn]
78              show recursively all associated off all associated classes [cur‐
79              rent: none]
80
81
82       -b, --builtin
83              include  builtin  objects in representation of classes [current:
84              False]
85
86       -m [yn], --module-names=[yn]
87              include module name in  representation  of  classes.  This  will
88              include full module path in the class name. [current: none]
89
90
91       -k, --only-classnames
92              don't  show attributes and methods in the class boxes; this dis‐
93              ables -f values [current: False]
94
95
96       -o <format>, --output=<format>
97              create a *.<format> output file if format  available.  Available
98              formats are all formats that dot can produce and vcg.  [default:
99              dot]
100
101

EXAMPLES

103        Here are some examples for command line options :
104
105
106       pyreverse <project> -a1 -s1 -m
107
108              -a1 -s1 will  include  one  level  of  ancestor  and  associated
109              classes  in the diagram  of the <project> modules, while -m will
110              show the full module path of each class. You can  use  the  same
111              way  the  -a,  -s,  -A, -S options.  Note that on class diagrams
112              (using -c ) -a and -s will rather reduce than enlarge your  dia‐
113              gram.
114
115
116       pyreverse mod/foo.py mod/fee.py -k
117
118              This is interesting if the diagram for <project>=mod is too com‐
119              plicated: you can show only the class names  (no  attributes  or
120              methods, option -k); or take only the modules you are interested
121              in (here fee.py and foo.py).
122
123

REQUIRES

125       Python
126
127

SEE ALSO

129       dot(1), pylint(1)
130
131       http://www.logilab.org/pyreverse
132
133

AUTHORS

135       Sylvain Thenault, Emile Anclin
136
137       This manpage was written by Emile Anclin <emile.anclin@logilab.fr>
138
139
140
141pyreverse                       August 18, 2008                   PYREVERSE(1)
Impressum