1SPHINX-APIDOC(1)                    Sphinx                    SPHINX-APIDOC(1)
2
3
4

NAME

6       sphinx-apidoc - Sphinx API doc generator tool
7

SYNOPSIS

9       sphinx-apidoc  [OPTIONS]  -o  <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PAT‐
10       TERN, …]
11

DESCRIPTION

13       sphinx-apidoc is a tool for  automatic  generation  of  Sphinx  sources
14       that,  using  the  autodoc  extension,  document a whole package in the
15       style of other automatic API documentation tools.
16
17       MODULE_PATH is the path to a  Python  package  to  document,  and  OUT‐
18       PUT_PATH  is  the directory where the generated sources are placed. Any
19       EXCLUDE_PATTERNs given are fnmatch-style file and/or directory patterns
20       that will be excluded from generation.
21
22       WARNING:
23          sphinx-apidoc  generates source files that use sphinx.ext.autodoc to
24          document all found modules.  If any modules  have  side  effects  on
25          import, these will be executed by autodoc when sphinx-build is run.
26
27          If  you  document scripts (as opposed to library modules), make sure
28          their main routine is protected by a if __name__ == '__main__'  con‐
29          dition.
30

OPTIONS

32       -o <OUTPUT_PATH>
33              Directory to place the output files. If it does not exist, it is
34              created.
35
36       -f, --force
37              Force overwriting of any existing generated files.
38
39       -l, --follow-links
40              Follow symbolic links.
41
42       -n, --dry-run
43              Do not create any files.
44
45       -s <suffix>
46              Suffix for the source files generated. Defaults to rst.
47
48       -d <MAXDEPTH>
49              Maximum depth for the generated table of contents file.
50
51       --tocfile
52              Filename for a table of contents file. Defaults to modules.
53
54       -T, --no-toc
55              Do not create a table of contents file. Ignored when  --full  is
56              provided.
57
58       -F, --full
59              Generate  a  full  Sphinx project (conf.py, Makefile etc.) using
60              the same mechanism as sphinx-quickstart.
61
62       -e, --separate
63              Put documentation for each module on its own page.
64
65              New in version 1.2.
66
67
68       -E, --no-headings
69              Do not create headings for the modules/packages. This is useful,
70              for example, when docstrings already contain headings.
71
72       -P, --private
73              Include “_private” modules.
74
75              New in version 1.2.
76
77
78       --implicit-namespaces
79              By  default  sphinx-apidoc processes sys.path searching for mod‐
80              ules only.  Python 3.3 introduced PEP  420  implicit  namespaces
81              that  allow  module path structures such as foo/bar/module.py or
82              foo/bar/baz/__init__.py (notice that bar and foo are namespaces,
83              not modules).
84
85              Interpret paths recursively according to PEP-0420.
86
87       -M, --module-first
88              Put module documentation before submodule documentation.
89
90       These options are used when --full is specified:
91
92       -a     Append module_path to sys.path.
93
94       -H <project>
95              Sets the project name to put in generated files (see project).
96
97       -A <author>
98              Sets  the  author  name(s)  to put in generated files (see copy‐
99              right).
100
101       -V <version>
102              Sets the project version to put in  generated  files  (see  ver‐
103              sion).
104
105       -R <release>
106              Sets  the  project  release  to  put  in  generated  files  (see
107              release).
108
109       Project templating
110
111       New in version 2.2: Project templating options for sphinx-apidoc
112
113
114       -t, --templatedir=TEMPLATEDIR
115              Template directory for template files.  You can modify the  tem‐
116              plates  of  sphinx project files generated by apidoc.  Following
117              Jinja2 template files are allowed:
118
119              · module.rst_t
120
121              · package.rst_t
122
123              · toc.rst_t
124
125              · master_doc.rst_t
126
127              · conf.py_t
128
129              · Makefile_t
130
131              · Makefile.new_t
132
133              · make.bat_t
134
135              · make.bat.new_t
136
137              In detail, please refer the system template  files  Sphinx  pro‐
138              vides.    (sphinx/templates/apidoc  and  sphinx/templates/quick‐
139              start)
140

ENVIRONMENT

142       SPHINX_APIDOC_OPTIONS
143              A comma-separated list of option to append to generated automod‐
144              ule  directives.  Defaults to members,undoc-members,show-inheri‐
145              tance.
146

SEE ALSO

148       sphinx-build(1), sphinx-autogen(1)
149
151       2007-2020, Georg Brandl and the Sphinx team
152
153
154
155
1562.2.2                            Jan 30, 2020                 SPHINX-APIDOC(1)
Impressum