pg.to_html

Accessible via pg.to_html, pg.views.to_html.

to_html(value, *, name=None, root_path=None, view_id='html-tree-view', **kwargs)[source]

Returns the HTML representation of a value.

Return type:

pg.Html

Parameters:
  • value – The value to render.

  • name – The name of the value.

  • root_path – The root path of the value.

  • view_id – The ID of the view to render the value. See pg.views.HtmlView.dir() for all available HTML view IDs.

  • **kwargs – Additional keyword arguments passed from pg.to_html, wich will be passed to the HtmlView.render_xxx() (thus Extension._html_xxx()) methods.

Returns:

The rendered HTML.