Links
AI / Agents
gdtest-marimo
A package demonstrating embedded marimo notebooks
Installation
pip install gdtest-marimoGet Started
- API Reference — Full API documentation
- User Guide — Guides and tutorials
Source files
gdtest_marimo/
__init__.py
"""Marimo islands demo package."""
__version__ = "1.0.0"
__all__ = ["greet"]
def greet(name: str) -> str:
"""Return a friendly greeting.
Parameters
----------
name
Who to greet.
Returns
-------
str
The greeting.
"""
return f"Hello, {name}!"notebooks/
demo.py
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "marimo",
# ]
# ///
import marimo
app = marimo.App()
@app.cell
def __():
import marimo as mo
return (mo,)
@app.cell
def __(mo):
mo.md(
"""
# Interactive Demo
Drag the slider below — the output updates reactively.
"""
)
return
@app.cell
def __(mo):
n = mo.ui.slider(1, 20, value=5, label="How many?")
n
return (n,)
@app.cell
def __(mo, n):
mo.md(f"You chose **{n.value}**. Its square is **{n.value ** 2}**.")
return
@app.cell
def __(mo):
factor = mo.ui.slider(1, 5, value=2, label="Multiplier")
factor
return (factor,)
@app.cell
def __(factor, mo, n):
mo.md(f"**{n.value}** × **{factor.value}** = **{n.value * factor.value}**")
return
@app.cell
def __(mo):
mo.md(
"""
## Notes
This notebook is intentionally longer to show that the iframe grows to
fit however many cells you add:
- Cells run in the browser via WebAssembly (Pyodide)
- Edit any cell and press Ctrl+Enter to re-run
- Dependent cells update reactively
"""
)
return
@app.cell
def __(mo, n):
mo.ui.table(
[{"i": i, "i_squared": i * i} for i in range(1, n.value + 1)],
selection=None,
)
return
if __name__ == "__main__":
app.run()user_guide/
01-islands.qmd
---
title: Marimo Islands
---
# Interactive Notebook (Island Mode)
The notebook below is embedded with the default island mode. Its cells
run in the browser via WebAssembly (Pyodide).
{{< marimo file="notebooks/demo.py" >}}02-nocode.qmd
---
title: Outputs Only
---
# Outputs Only (show-code=false)
The same notebook, rendered with the source hidden — useful for
dashboard-style presentations.
{{< marimo file="notebooks/demo.py" show-code="false" >}}03-iframe.qmd
---
title: Iframe Mode
---
# Full Notebook (Iframe Mode)
The same notebook embedded as a **fully editable, reactive** Marimo
notebook in a sandboxed iframe (self-hosted WASM, full editor chrome).
Edit any cell and press Ctrl+Enter — dependent cells re-run live.
{{< marimo file="notebooks/demo.py" mode="iframe" height="760px" >}}great-docs.yml
marimo: true dark_mode: true