MODULE

MKAPI.CORE.CODE

This module provides Code class for source code.

Classes
  • Code Code class represents source code of an object.</>
Functions
dataclass

mkapi.core.code.Code(module)

Code class represents source code of an object.

Parameters
  • module (Module) Module instance.
Attributes
  • html (str) Converted HTML.
  • level (int) Heading level.
  • markdown (str) Markdown source.
  • module (Module) Module instance.
Methods
  • get_html(filters) (str) Renders and returns HTML.</>
  • get_markdown(level) (str) Returns a Markdown source for docstring of this object.</>
method

get_markdown(level=1) → str

Returns a Markdown source for docstring of this object.

Parameters
  • level (int, optional)
method

get_html(filters=None) → str

Renders and returns HTML.

Parameters
  • filters (list of str, optional)
function

mkapi.core.code.get_code(name)Code

Returns a Code instace by module name.

Parameters
  • name (str) Module name.