Command Line Interface

sphinxgen

Generate sphinx stub files for all modules in a python package.

package_dir

The package directories to process.

-h, --help

show this help message and exit

-o <output>, --output <output>

The directory where output will be written. The default is the current directory.

--prefix <prefix>

A prefix to use for every generated file name. If –index is used, the prefix will not be used for the generated index file.

--overwrite

Overwrite any existing files.

-n, --dry-run

Do a dry run, do not actually generate any files, just print what would happen if we did.

--index <path>

The path to the index file to generate (without extension). The default is “index”, with appropriate prefix as specified by the –prefix option. if you explicitly use this option, the prefix will not be added.

--no-index

Do not generate an index file.

--no-modules

Do not generate separate files for modules, only packages.

--package-template <path>

The path to the jinja2 template file to use for generating package files. If not given, a built-in template will be used.

--module-template <path>

The path to the jinja2 template file to use for generating module files. See –package-template for more details. The default is “module.rst”.

--index-template <path>

The path to the jinja2 template file to use for generating the index file. See –package-template for more details. The default is “index.rst”.

--dump-templates <template_dir>

Dump the built-in template files to the specified directory. This is useful as a starting point for creating your own template files. The template files are named package.rst, module.rst, and index.rst.

--debug

Print detailed logs for debugging.

--version

show program’s version number and exit