MdRenderer

MdRenderer(
    self,
    header_level=1,
    show_signature=True,
    show_signature_annotations=False,
    display_name='relative',
    hook_pre=None,
    render_interlinks=False,
    table_style='table',
)

Render docstrings to markdown.

Parameters

header_level : int = 1

The level of the header (e.g. 1 is the biggest).

show_signature : bool = True

Whether to show the function signature.

show_signature_annotations : bool = False

Whether to show annotations in the function signature.

display_name : str = 'relative'

The default name shown for documented functions. Either “name”, “relative”, “full”, or “canonical”. These options range from just the function name, to its full path relative to its package, to including the package name, to its the its full path relative to its .__module__.

Examples

>>> from quartodoc import MdRenderer, get_object
>>> renderer = MdRenderer(header_level=2)
>>> f = get_object("quartodoc", "get_object")
>>> print(renderer.render(f)[:81])
## get_object
`get_object(module: str, object_name: str, parser: str = 'numpy')`

Attributes

Name Description
style str(object=’’) -> str

Methods

Name Description
render Return a string representation of an object, or layout element.
render_annotation Special hook for rendering a type annotation.
render_header Render the header of a docstring, including any anchors.
signature Return a string representation of an object’s signature.
summarize Produce a summary table.