You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marimo is an open-source reactive notebook for Python — reproducible, git-friendly, executable as a script, and shareable as an app. As an alternative to jupyter/ipython.
There is ipython_magic, but not work for marimo(need invoke and ipython).So I make a monkey-patch, but It's better to add support natively.
I have a small question: how do you pass rendering arguments?
Maybe it would be great if Slide had a render_html method that returns RevealJS class instance, and add __repr_html__ to RevealJS. The render_html could accept *args: list (or args: Sequence[str]) and use them to control the rendering.
I have a small question: how do you pass rendering arguments?
Maybe it would be great if Slide had a render_html method that returns RevealJS class instance, and add __repr_html__ to RevealJS. The render_html could accept *args: list (or args: Sequence[str]) and use them to control the rendering.
Good question, This is what I thought before, but it doesn't work.
# not work because render is delayedwithtempconfig({"frame_height": 100.0}):
CircleToSquare
I plan to discuss with marimo that it should provide a way to render with contextmanager.
Maybe, wrapper with config, and config is optional.
This new feature doesn't seem to be unique to marimo, and will likely work on Jupyter Notebook too. I think adding new methods to both Slide and RevealJS can be good enough.
Something like this:
classSlide:
defrender_html(args: list[str]) ->RevealJS:
# render slides with optional arguments and return RevealJS class instancedef_repr_html_(self) ->HTML:
self.render_html([])._repr_html_()
classRevealJS:
def_repr_html_(self) ->HTML:
# convert to HTML and generate output cell
Terms
Description
Marimo is an open-source reactive notebook for Python — reproducible, git-friendly, executable as a script, and shareable as an app. As an alternative to jupyter/ipython.
There is
ipython_magic
, but not work for marimo(need invoke andipython
).So I make a monkey-patch, but It's better to add support natively.The monkey-patch add
Slide._repr_html_
likeipython_magic
. Document about this apiMonkey patch
Usage:
Screenshots
Additional information
No response
The text was updated successfully, but these errors were encountered: