0

I've got two modules:

first_module containing functions a, b and c

second_module containing functions d, e and f

I would like to generate an HTML documentation using pdoc such that it doesn't document both modules in whole, but rather contains only functions b, e, and f.

Any ideas?

Pat Res
  • 97
  • 1
  • 7
  • This question looks like a duplicate of https://stackoverflow.com/questions/73299581/can-single-pdoc-generated-pages-document-apis-spread-over-multiple-files – Franz Oct 19 '22 at 08:50

1 Answers1

0

You can declare __all__ in your modules as pdoc respects it.

Alternatively, you can override some docstrings with a __pdoc__ dict in each module:

# first_module.py:
___pdoc___ = {
    'a': False,
    'c': False,
}

and:

# second_module.py:
___pdoc___ = {
    'd': False,
}
K3---rnc
  • 6,717
  • 3
  • 31
  • 46
  • Note that this answer is for the module pdoc3, not for pdoc. For pdoc, the use of `__all__` is actually the way to go: https://stackoverflow.com/questions/73299581/can-single-pdoc-generated-pages-document-apis-spread-over-multiple-files – Franz Oct 19 '22 at 08:51
  • @Franz Fwiw, in November 2020, while mitmproxy/pdoc was still abandoned, the question was likely referring to pdoc3. – K3---rnc Oct 19 '22 at 11:39