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
| Name | Type | Description |
|---|---|---|
| python_value | Any | The Python object, such as a Markdown string or Pandas DataFrame, to be converted into HTML format |
Returns
| Type | Description |
|---|---|
str | An HTML document as a string. |