1pyreverse(1) User's Manual pyreverse(1)
2
3
4
6 pyreverse - parse python sources files and extract diagrams from them.
7
8
10 pyreverse [options] <modules>
11
12
14 pyreverse is a python source analyzer. It parses 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
32 -h, --help
33 show 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 --ignore=<file[,file...]>
40 add files or directories to the blacklist. They should be base
41 names, not paths. [current: CVS]
42
43 -f<mode>, --filter-mode=<mode>
44 filter attributes and functions according to <mode>. You can
45 combine modes using '+' like 'SPECIAL+OTHER'. Correct modes are
46 :
47 - 'PUB_ONLY' : filter all non public attributes (default)
48 - 'ALL' : no filter
49 - 'SPECIAL' : filter Python special functions except construc‐
50 tor
51 - 'OTHER' : filter protected and private attributes [current:
52 PUB_ONLY]
53
54
55 -d<file>, --diadefs=<file>
56 create diagram according to the diagram definitions in <file>
57
58 -c <class>, --class=<class>
59 create a class diagram with all classes related to <class>
60 [current: none] the class must be in the file <modules>. By
61 default, this will include all ancestors and associated classes
62 of <class> and include module names (i.e. '-ASmy' ).
63
64
65 -a <ancestor>, --show-ancestors=<ancestor>
66 show <ancestor> generations of ancestor classes not in
67 <projects>
68
69 -A, --all-ancestors=[yn]
70 show all ancestors off all classes in <projects> [current: none]
71
72 -s <ass_level>, --show-associated=<associated>
73 show <ass_level> associated classes. <ass_level>=1 will only
74 take classes directly related to the classes in the project,
75 while <ass_level>=2 will also take all classes related to those
76 fetched by<depth>=1.
77
78 -S, --all-associated=[yn]
79 show recursively all associated off all associated classes [cur‐
80 rent: none]
81
82
83 -b, --builtin
84 include builtin objects in representation of classes [current:
85 False]
86
87 -m [yn], --module-names=[yn]
88 include module name in representation of classes. This will
89 include the full module path in the class name. [current: none]
90
91
92 -k, --only-classnames
93 don't show attributes and methods in the class boxes; this dis‐
94 ables -f values [current: False]
95
96
97 -o <format>, --output=<format>
98 create a *.<format> output file if format available. Available
99 formats are all formats that dot can produce and vcg. [default:
100 dot]
101
102
104 Here are some examples for command line options:
105
106
107 pyreverse <project> -a1 -s1 -m
108
109 -a1 -s1 will include one level of ancestor and associated
110 classes in the diagram of the <project> modules, while -m will
111 show the full module path of each class. You can use the -a, -s,
112 -A, -S options in the same way. Note that on class diagrams
113 (using -c ) -a and -s will rather reduce than enlarge your dia‐
114 gram.
115
116
117 pyreverse mod/foo.py mod/fee.py -k
118
119 This is interesting if the diagram for <project>=mod is too com‐
120 plicated: you can show only the class names (no attributes or
121 methods, option -k); or take only the modules you are interested
122 in (here fee.py and foo.py).
123
124
126 Python
127
128
130 dot(1), pylint(1)
131
132 https://www.logilab.org/pyreverse
133
134
136 Sylvain Thenault, Emile Anclin
137
138 This manpage was written by Emile Anclin <emile.anclin@logilab.fr>
139
140
141
142pyreverse August 18, 2008 pyreverse(1)