title: Autodocumenting Python using Sphinx
body: <p>This is a generalized version of a <a href="https://stackoverflow.com/questions/1326796/using-sphinx-to-auto-document-a-python-class-module">previous question regarding Sphinx</a>.</p>
  
  <p>Is there a way to recursively autodocument modules or packages which contain classes and functions within them?</p>
  
  <p>I think it is silly to add the <code>autofunction</code> or <code>automodule</code> 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.</p>
  
  <p><strong>Clarification:</strong>
  Instead of :</p>
  
  <pre><code>.. automodule:: segments.segments
  
      .. autoclass:: segments.segments.Seg
  
          .. automethod:: Seg.method_1
  
          .. automethod:: Seg.method_2
  
          .. automethod:: Seg.method_3
  
          .......
  
          .. automethod:: Seg.method_n
  </code></pre>
  
  <p>Which requires me to manually cut-and-paste all method names and update the documentation correspondingly, I want to have a command like:</p>
  
  <pre><code>.. automodule:: segments.segments
  
      .. autoclass:: segments.segments.Seg
  
          .. MAGIC COMMAND: Automatically print the docstrings and signatures 
             of all Seg() methods.
  </code></pre>