jdidion / docparse

Parse python docstrings (beta)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Parse python docstrings (beta)

License:MIT License


Languages

Language:Python 94.9%Language:Makefile 5.1%