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!