Skip to main content

Renderable

This protocol defines a runtime-checkable interface for converting objects into HTML representations. Classes implementing this protocol provide a method to transform Python values, such as Markdown or DataFrames, and return the generated HTML document as a string.

Methods​


to_html()​

def to_html(self, python_value: Any) -> str: ...

Convert an object(markdown, pandas.dataframe) to HTML and return HTML as a unicode string.

Parameters​

NameTypeDescription
python_valueAnyThe object (such as markdown or a pandas DataFrame) to convert to HTML

Returns​

TypeDescription
strAn HTML document as a string.