/docparse

Parse python docstrings (beta)

Primary LanguagePythonMIT LicenseMIT

docparse

Library to parse common python docstring formats.

Usage

import docparse

def func(x: int):
  """This is a function with a Google-style docstring.

  Args:
    x: A paramter named 'x'

  Returns:
    The square of x.
  """
  return x*x

func_docs = docparse.parse_docs(func)

print(func_docs.summary)
print(func_docs.parameters["x"])
print(func_docs.returns)

Todo