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

ENVIRONMENT

146       SPHINX_APIDOC_OPTIONS
147              A comma-separated list of option to append to generated automod‐
148              ule  directives.  Defaults to members,undoc-members,show-inheri‐
149              tance.
150

SEE ALSO

152       sphinx-build(1), sphinx-autogen(1)
153
155       2007-2023, the Sphinx developers
156
157
158
159
1606.2.1                            Jul 27, 2023                 SPHINX-APIDOC(1)
Impressum