Renderable
This class defines a protocol for objects that can be rendered into HTML. It specifies a single method, to_html, which takes a Python value and returns its HTML representation as a string. This is useful for integrating various data types, such as markdown or pandas DataFrames, into HTML output.
Methods
def to_html(python_value: Any) - > string
-
Convert an object(markdown, pandas.dataframe) to HTML and return HTML as a unicode string.
-
Parameters
- python_value: Any
- The object to convert to HTML.
- python_value: Any
-
Return Value: string
- An HTML document as a string.