Get help from the marimo community

n
nellyg
Offline, last seen 8 hours ago
Joined November 25, 2024
I am trying to make it so I can export a report I built in Marimo to static HTML so that the report is pre-computed and can be displayed on a separate Marimo application. Part of this report goes into a deep dive analysis of specific variables. Currently the report runs on the app so its easy enough to use the dropdown to choose which variable to dive into.

The report however, is very compute intensive, and it would be nice to run the report beforehand and just show the HTML from it in the app. However, in static HTML, the dropdown doesn't work due to it requiring some python code to run. I am trying to find an adequate workaround for this. I attempted to use tabs, which actually worked magnificently, except for I have too many tabs to fit on the screen. The carousel also almost works, however it is not user friendly to have to scroll down in the carousel to see the full deep dive.

I havent messed too much with WASM stuff. Not sure if you can run the WASM html inside another Marimo app? My hope is that the main Marimo app just shows a list of reports that have been generated and can load the selected HTML report. So I am not sure if that is possible with the WASM export. Something that looks like the dropdown but acts like the tabs would be ideal at this point. I know I could generate a large accordion if needed as well, I just don't love the way it looks as much as something like the tabs. But thought I would check and see if there was a more elegant solution to this?

Thanks!
We run an internal reporting application that I would like to speed up significantly. The flow of these reports are all pretty simple:

  1. Pull Data
  2. Run a bunch of calculations
  3. Build visualizations
  4. Display
What I think Marimo is probably capable of, but it isn't super clear to me yet? Is doing something like where we cache the report once it has been calculated. And if the same report is calculated again, just pull in the html that was previously cached. If it is the first time, build the full report and cache that html.

Are there any examples around this? What feels weird to me is a notebook caching itself as html programatically and potentially displaying a cached version of itself. But it seems like the tools are probably already in place to do this?
I feel like this should just happen automatically, but if I try to go dark mode, my altair charts all get wonky. I expected I would get a dark background in my chart by default and my text would change to white.
18 comments
W
A
H
n