This is a generalized version of a previous question regarding Sphinx.
Is there a way to recursively autodocument modules or packages which contain classes and functions within them?
I think it is silly to add the autofunction or automodule directive for each function; There must be a way to automate the process, otherwise I don't see the point of using Sphinx at all.
Clarification: Instead of :
.. automodule:: segments.segments
    .. autoclass:: segments.segments.Seg
        .. automethod:: Seg.method_1
        .. automethod:: Seg.method_2
        .. automethod:: Seg.method_3
        .......
        .. automethod:: Seg.method_n
Which requires me to manually cut-and-paste all method names and update the documentation correspondingly, I want to have a command like:
.. automodule:: segments.segments
    .. autoclass:: segments.segments.Seg
        .. MAGIC COMMAND: Automatically print the docstrings and signatures 
           of all Seg() methods.
                To support Markdown-based documentation, Sphinx can use MyST-Parser. MyST-Parser is a Docutils bridge to markdown-it-py, a Python package for parsing the CommonMark Markdown flavor.
We use
.. automodule:: module
   :members:
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With