I have a Python package which is spread over multiple files:
package/__init__.py
package/thing_a.py
package/thing_b.py
package/thing_c.py
package/submodule/__init__.py
package/submodule/...
The thing_XXX
s break apart chunks of internal code into something that is easier for me to manage. The __init__.py
files exports the public APIs that I want at the top-level and within each submodule:
from .thing_a import the_greatest_thing
from .thing_b import even_greater_thing
from .thing_c import i_am_the_best
What I would like is for the documentation to display the docs for the_greatest_thing
, even_greater_thing
and i_am_the_best
and provide a link to look at what's in submodule
. What I get is a landing page which shows thing_a
, thing_b
, thing_c
and submodule
as submodules which I need to click on to get documentation. All the thing_XXX
s are private and I use __init__.py
to decide what gets exported - this is true also for the contents of the submodule. I would be happy to prefix them with underscores (which does prevent them showing up in the documentation) but I still can't seem to figure out how to bring all the documentation I want together.
Can this be done with pdoc? Or am I trying to do something wild and silly?