1

I have a Python package which contains submodules. Currently, my intention is to allow usage of functionality what the package exports, e.g.:

package_X
+-- __init__.py
+-- submodule_A.py
+-- submodule_B.py

Submodules are implementation details. Everything the user of the package needs to know is exported in the __init__.py file.

Now when building documentation with Sphinx, I get TOC and documentation as follows:

package_X

  Submodules
    submodule_A.py
    submodule_B.py

Is there any setting or directive I can write to __init__.py or submodule_*.py to make public stuff appear as if it were directly in package_X? I am also ready to modify conf.py to make that work.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
ovanes
  • 5,483
  • 2
  • 34
  • 60
  • possible duplicate of [How to make Sphinx Respect Importing Classes Into Package with \_\_init\_\_.py](http://stackoverflow.com/questions/22096187/how-to-make-sphinx-respect-importing-classes-into-package-with-init-py) – mzjn Aug 13 '14 at 16:42

0 Answers0