pytools.api.doc.APIDefinition#

class pytools.api.doc.APIDefinition[source]#

A reference to the definition of an API element, e.g., a module, class, or function.

Metaclasses

ABCMeta

Method summary

list_documented_parameters

Extract all documented parameter names from the docstring, including "return" if the return parameter is documented.

Attribute summary

docstring

The docstring of this API element; None if the docstring is undefined.

full_name

The full name of this API element, including the full module name and containing element names.

name

The name of this API element.

public_module

The public module that exposes the API definition.

Definitions

list_documented_parameters()[source]#

Extract all documented parameter names from the docstring, including "return" if the return parameter is documented.

Return type

Optional[list[str]]

Returns

list of parameter names

abstract property docstring: str | None#

The docstring of this API element; None if the docstring is undefined.

Return type

Optional[str]

abstract property full_name: str#

The full name of this API element, including the full module name and containing element names.

Return type

str

abstract property name: str#

The name of this API element.

Return type

str

abstract property public_module: str#

The public module that exposes the API definition. This may not necessarily be the same as the module in which the element is actually defined.

Return type

str