Converting a hvplot to StringIO or ByteIO

Hi, I generate a hvplot in a python flask server, and want to send it to the front end for downloading purpose, but I am not sure how to convert a hvplot to a StringIO or ByteIO stream for downloading

1 Like

Hi @kingandrew

You might find inspiration in Exporting and Archiving, the docstring ?hv.save and this example.

But I believe the current documentation is poor and have a feature request for getting it improved here

If you have a more concrete question please add some minimum, reproducible code below to start from .Thanks.

This may be the wrong direction but bokeh has a function, my understanding from following Brian is it renders in memory and takes a screen shot then spits it out might be of some use if connecting a button

[Exporting plots — Bokeh 2.4.3 Documentation]

I actually tried the get screenshot method, and it worked, but it requires a dependency that needs the installation of conda, I don’t want to download so many depencies because my cloud has a limited space, that’s why I am wondering if there are easier way to download a holoview graph, such as converting it to a data stream, etc,