Look for html repr on objects (generally a method called `_repr_html_`)

I have just started looking into streamlit after working on and using Panel. I am not sure if I missed this, but I was expecting an object with a _repr_html_ method to be automatically renderable with streamlit.

If streamlit looked for that method, it would be easy for other libraries to make themselves renderable. Additionally, many libraries already have html reprs since they are renderable in notebooks. See this blog post for examples of libraries that comply with this defacto standard.

1 Like

Hi @jsignell, and welcome to Streamlit!

We donโ€™t currently look for this property, but it sounds like it dovetails nicely with work weโ€™re doing to support arbitrary iframeโ€™d HTML. Iโ€™ve opened a feature request here. Thanks a lot for the suggestion!