title: How can I parse a numpydoc docstring and access components?
body: <p>I'd like to parse a numpydoc docstring and access each component programatically.</p>
  
  <p>For example:</p>
  
  <pre><code>def foobar(a, b):
     '''Something something
  
     Parameters
     ----------
     a : int, default: 5
          Does something cool
     b : str
          Wow
  '''
  </code></pre>
  
  <p>What I'd like to do is:</p>
  
  <pre><code>parsed = magic_parser(foobar)
  parsed.text  # Something something
  parsed.a.text  # Does something cool
  parsed.a.type  # int
  parsed.a.default  # 5
  </code></pre>
  
  <p>I've been searching around and found things like <a href="https://pypi.python.org/pypi/numpydoc" rel="noreferrer">numpydoc</a> and <a href="https://sphinxcontrib-napoleon.readthedocs.io/en/latest/" rel="noreferrer">napoleon</a> but I haven't found any good leads for how to use them in my own program. I'd appreciate any help.</p>