# SPHINX-APIDOC(1) - man - phpman

[SPHINX-APIDOC(1)](https://www.chedong.com/phpMan.php/man/SPHINX-APIDOC/1/markdown)                               Sphinx                               [SPHINX-APIDOC(1)](https://www.chedong.com/phpMan.php/man/SPHINX-APIDOC/1/markdown)



## NAME
       sphinx-apidoc - Sphinx API doc generator tool

## SYNOPSIS
       **sphinx-apidoc** [_OPTIONS_] -o <_OUTPUT_PATH_> <_MODULE_PATH_> [_EXCLUDE_PATTERN_ ...]

## DESCRIPTION
       **sphinx-apidoc**  is  a  tool for automatic generation of Sphinx sources that, using the **autodoc**
       extension, document a whole package in the style of other automatic API documentation tools.

       _MODULE_PATH_ is the path to a Python package to document, and  _OUTPUT_PATH_  is  the  directory
       where  the  generated  sources  are placed. Any _EXCLUDE_PATTERN_s given are _fnmatch-style_ file
       and/or directory patterns that will be excluded from generation.

### WARNING:
          **sphinx-apidoc** generates source files that use **sphinx.ext.autodoc**  to  document  all  found
          modules.   If  any  modules have side effects on import, these will be executed by **autodoc**
          when **sphinx-build** is run.

          If you document scripts (as opposed to library modules), make sure their main  routine  is
          protected by a **if** ____**name**____ **==** **'**____**main**____**'** condition.

## OPTIONS
### -o
              Directory to place the output files. If it does not exist, it is created.

### -q
              error.

### -f, --force
              Force overwriting of any existing generated files.

### -l, --follow-links
              Follow symbolic links.

### -n, --dry-run
              Do not create any files.

### -s <suffix>
              Suffix for the source files generated. Defaults to **rst**.

### -d <MAXDEPTH>
              Maximum depth for the generated table of contents file.

### --tocfile
              Filename for a table of contents file. Defaults to **modules**.

### -T, --no-toc
              Do not create a table of contents file. Ignored when _--full_ is provided.

### -F, --full
              Generate a full Sphinx project (**conf.py**, **Makefile** etc.) using the  same  mechanism  as
              **sphinx-quickstart**.

### -e, --separate
              Put documentation for each module on its own page.

              New in version 1.2.


### -E, --no-headings
              Do  not  create  headings  for the modules/packages. This is useful, for example, when
              docstrings already contain headings.

### -P, --private
              Include "_private" modules.

              New in version 1.2.


### --implicit-namespaces
              By default sphinx-apidoc processes sys.path searching for modules  only.   Python  3.3
              introduced  _PEP_  _420_  implicit  namespaces  that  allow module path structures such as
              **foo/bar/module.py** or **foo/bar/baz/**____**init**____**.py** (notice that **bar** and **foo** are  namespaces,
              not modules).

              Interpret paths recursively according to PEP-0420.

### -M, --module-first
              Put module documentation before submodule documentation.

       These options are used when _--full_ is specified:

### -a

### -H <project>
              Sets the project name to put in generated files (see **project**).

### -A <author>
              Sets the author name(s) to put in generated files (see **copyright**).

### -V <version>
              Sets the project version to put in generated files (see **version**).

### -R <release>
              Sets the project release to put in generated files (see **release**).

       Project templating

       New in version 2.2: Project templating options for sphinx-apidoc


### -t, --templatedir=TEMPLATEDIR
              Template directory for template files.  You can modify the templates of sphinx project
              files generated by apidoc.  Following Jinja2 template files are allowed:

              • **module.rst**___**t**

              • **package.rst**___**t**

              • **toc.rst**___**t**

              • **root**___**doc.rst**___**t**

              • **conf.py**___**t**

              • **Makefile**___**t**

              • **Makefile.new**___**t**

              • **make.bat**___**t**

              • **make.bat.new**___**t**

              In detail, please refer the  system  template  files  Sphinx  provides.   (**sphinx/tem**‐‐
              **plates/apidoc** and **sphinx/templates/quickstart**)

## ENVIRONMENT
       **SPHINX**___**APIDOC**___**OPTIONS**
              A  comma-separated  list  of  option to append to generated **automodule** directives. De‐
              faults to **members,undoc-members,show-inheritance**.

## SEE ALSO
       [**sphinx-build(1)](https://www.chedong.com/phpMan.php/man/sphinx-build/1/markdown)**, [**sphinx-autogen(1)](https://www.chedong.com/phpMan.php/man/sphinx-autogen/1/markdown)**

## COPYRIGHT
       2007-2021, Georg Brandl and the Sphinx team




4.3.2                                       Dec 19, 2021                            [SPHINX-APIDOC(1)](https://www.chedong.com/phpMan.php/man/SPHINX-APIDOC/1/markdown)
