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
| Name | Type | Description |
|---|---|---|
| python_value | Any | The object (such as markdown or a pandas DataFrame) to convert to HTML |
Returns
| Type | Description |
|---|---|
str | An HTML document as a string. |