Usage
Add structured information to the end of your python docstrings.
- parse_docdata(obj=None, *, delimiter='---', formatter=None)[source]
Parse the structured data from the end of the docstr and store it in
__docdata__
.The data after the delimiter should be in the YAML form. It is parsed with
yaml.safe_load()
then stored in the__docdata__
field of the object.- Parameters
- Return type
- Returns
The same object with a modified docstr.
- Raises
AttributeError – if the object has no
__doc__
field.