Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

662 B
Raw Blame
import marimo

__generated_with = "0.0.0"
app = marimo.App()


@app.cell
def _():
    import marimo as mo

    return (mo,)


@app.cell
def _():
    """Pypercent format notebook."""

    import numpy as np

    return (np,)


@app.cell(hide_code=True)
def _(mo):
    mo.md(r"""
    This is a markdown cell
    with multiple lines
    """)


@app.cell(hide_code=True)
def _(mo):
    mo.md(r"""
    This is a doc string, but also markdown
    """)


@app.cell
def _(np):
    # First code cell
    x = np.array([1, 2, 3])
    print(x)
    return (x,)


@app.cell
def _(x):
    # Cell with title
    y = x * 2
    print(y)


if __name__ == "__main__":
    app.run()