MODULE

MKAPI.CORE.MODULE

This modules provides Module class that has tree structure.

Classes
  • Module Module class represents a module.</>
Functions
dataclass

mkapi.core.module.Module(obj)

Module class represents a module.

Parameters
  • obj (any) Object.
Attributes
  • docstring (Docstring) Docstring instance.
  • lineno (int) Line number.
  • members (list of Module) Member Module instances.
  • node (Node) Node inspect of self.
  • obj (any) Object.
  • object (Object) Object instance.
  • parent (Module, optional) Parent Module instance.
  • sourcefile (str) Source file path.
Methods
method

__getitem__(index)

Returns a member Module instance.

If index is str, a member Tree instance whose name is equal to index is returned.

Parameters
  • index (Union(int, str, list of str))
Raises
  • IndexError If no member found.
generator

walk()Tree

Yields all members.

method

get_kind() → str

Returns kind of self.

method

get_members() → list of Module

Returns a list of members.

method

get_markdown(filters) → str

Returns a Markdown source for docstring of this object.

Parameters
  • filters (list of str) A list of filters. Avaiable filters: upper, inherit, strict.
function

mkapi.core.module.get_module(name)Module

Returns a Module instace by name or object.

Parameters
  • name Object name or object itself.