Sphinx-apidoc and 'src' layout
11:41 08 Dec 2025

I want to document my code using sphinx but I'm using the 'src' layout for my structure. Below is an example:

products
├── src
│   └── products
│       ├── agreport.py
│       ├── cci.py
│       ├── climograph.py
│       ├── cropreport.py
│       ├── degreedays.py
│       ├── heatindex.py
│       ├── __init__.py
│       ├── penmanet.py
│       ├── precipsummary.py
│       ├── productfactory.py
│       ├── temperaturesummary.py
│       ├── windchill.py
│       └── windrose.py

The rst file contains the bare minimum:

Products module
===============

.. automodule:: products
    :members:
    :undoc-members:
    :show-inheritance:

Calling apidocs to generate the class documentation is not working. It does produce documentation that is within __init__ but not the other files in the directory.

sphinx-apidoc --implicit-namespaces --force -o docs/ ../products/
python sphinx