Skip to main content

Renderable

This class defines a protocol for objects that can be converted into HTML format. It requires the implementation of a method to transform various Python types, such as Markdown or DataFrames, into a Unicode HTML string.

Constructor

Signature

def Renderable()

Methods


to_html()

@classmethod
def to_html(
python_value: Any
) - > str

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

Parameters

NameTypeDescription
python_valueAnyThe Python object, such as a Markdown string or Pandas DataFrame, to be converted into HTML format

Returns

TypeDescription
strAn HTML document as a string.