Open akshayka opened 5 months ago
Some follow up from that discussion:
We don't support such an export yet. In the meantime, one can iframe marimo.app URLs (https://docs.marimo.io/guides/wasm.html#embedding).
@astrowonk mentioned working with local files as a use case that makes marimo.app links difficult to use. We do have a beta sandbox that lets you attach files to WASM notebooks, via the browser's storage; I'm not actually sure how you'd do it via a static export.
@astrowonk and others who have requested this: are local files the only reason you need exports? We'd appreciate more feedback before going down this route, since it will take us some time.
I would say I have a few reasons for wanting WASM export, though I could be in the minority so even if this is important to me, it is no guarantee it's worth your development time (yet.)
If this export of the tutorials was reactive - would that solve your use case?
If this export of the tutorials was reactive - would that solve your use case?
I think … so? I mean the idea is to get WASM-goodness that is on marimo.app but self-hosted on any web server (plus being able to be import code from other python files in the same directory). I'd love to someday type marimo export notebook.py notebook_folder
and copy that the resulting folder to a directory on my web site, and have a live interactive notebook.
Building on this, it would also be great to have a way to generate the wasm permalink programmatically, similarly to the marimo export html
, just with the wasm version in the iframe.
You can do this without the marimo
CLI. The link is just https://marimo.app/#code/{url_encoded_code}
url_encoded_code
is URL escaped code which is just urllib.parse.quote(code, safe="~()*!.'")
but you will hit a 2mb limit that is imposed by your browsers (not the server)
You can do this without the
marimo
CLI. The link is justhttps://marimo.app/#code/{url_encoded_code}
url_encoded_code
is URL escaped code which is justurllib.parse.quote(code, safe="~()*!.'")
but you will hit a 2mb limit that is imposed by your browsers (not the server)
Yes, that’s useful for some contexts, but I don’t want it to be limited to what can be encoded in a url. And I want to access other data locally (parquet, csv, sqlite, etc.)
Discussed in https://github.com/marimo-team/marimo/discussions/1078