Skip to content Skip to sidebar Skip to footer

How To Document Python Packages Using Sphinx

I am trying to document a package in Python. At the moment I have the following directory structure: . └── project ├── _build │   ├── doctrees │

Solution 1:

Here is an outline:

  1. Document your package using docstrings in the sources.
  2. Use sphinx-quickstart to create a Sphinx project.
  3. Run sphinx-apidoc to generate .rst sources set up for use with autodoc. More information here.

    Using this command with the -F flag also creates a complete Sphinx project. If your API changes a lot, you may need to re-run this command several times.

  4. Build the documentation using sphinx-build.

Notes:

Post a Comment for "How To Document Python Packages Using Sphinx"