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.

doc improvements (#1191)

Akshay Agrawalf4dab83e3062
diff --git a/docs/guides/overview.md b/docs/guides/overview.md
index 7a678600a1..45951c3aa7 100644
--- a/docs/guides/overview.md
+++ b/docs/guides/overview.md
@@ -1,10 +1,11 @@
# Overview
marimo notebooks are **reactive**: they automatically react to your code
-changes and UI interactions and keep your notebook up-to-date (like a
-spreadsheet).
+changes and UI interactions and keep your notebook up-to-date, not unlike a
+spreadsheet.
```{admonition} Creating marimo notebooks
+:class: tip
Make sure to first read the [getting started](/getting_started/index.md) page,
which teaches you how to install marimo and create notebooks.
@@ -16,9 +17,9 @@ A marimo notebook is made of small blocks of Python code called **cells**.
_When you run a cell, marimo automatically runs all cells that read any global
variables defined by that cell._ This is reactive execution.
-> **Reactive execution lets your notebooks double as interactive
-> apps**. It also guarantees that your code and program state are
-> consistent.
+> **Reactive execution guarantees that your code and program state are
+> consistent.** It also gives notebooks a deterministic execution order,
+> letting them double as both reproducible scripts and interactive apps.
<div align="center">
<figure>
@@ -26,13 +27,15 @@ variables defined by that cell._ This is reactive execution.
</figure>
</div>
+
**Execution order.**
The order of cells on the page has no bearing on the order cells are
-executed in: execution order is completely determined by the variables
-cells define and the cells they read. You have full freedom over
-how to organize your code and tell your stories: move helper functions and
-other "appendices" to the bottom of your notebook, or put cells with important
-outputs at the top.
+executed in: execution order is determined by the variables
+cells define and the variables they read.
+
+You have full freedom over how to organize your code and tell your stories:
+move helper functions and other "appendices" to the bottom of your notebook, or
+put cells with important outputs at the top.
**No hidden state.**
marimo notebooks have no hidden state because the program state is
@@ -53,6 +56,8 @@ For more on reactive execution, open the dataflow tutorial:
marimo tutorial dataflow
```
+or read the [reactivity guide](/guides/reactivity.md).
+
## The marimo library
marimo is both a notebook and a library. The marimo library lets you use
diff --git a/docs/guides/reactivity.md b/docs/guides/reactivity.md
index cb4c7d16aa..dce75f3d27 100644
--- a/docs/guides/reactivity.md
+++ b/docs/guides/reactivity.md
@@ -1,7 +1,13 @@
# Reactivity
-marimo notebooks _react_ to your code changes. Reactive execution is based
-on a single rule:
+Every marimo notebook is a directed acyclic graph (DAG) that models how data
+flows across blocks of Python code, i.e., cells.
+
+marimo _react_ to code changes, automatically executing cells with the latest
+data. Execution order is determined by the DAG, not by the order of cells on
+the page.
+
+Reactive execution is based on a single rule:
```{admonition} Runtime Rule
:class: tip
@@ -10,14 +16,10 @@ When a cell is run, marimo automatically runs all other cells that
**reference** any of the global variables it **defines**.
```
-To provide reactive execution, marimo creates a directed acyclic graph
-(DAG) out of your cells. Execution order is determined by the DAG, not by the
-order of cells on the page.
-
## References and definitions
-A marimo notebook is a DAG where nodes are cells and edges are
-data dependencies. marimo creates this graph by analyzing each cell, without
-running it, to determine its
+A marimo notebook is a DAG where nodes are cells and edges are data
+dependencies. marimo creates this graph by statically analyzing each cell
+(i.e., without running it) to determine its
- references, the global variables it reads but doesn't define;
- definitions, the global variables it defines.
@@ -25,17 +27,15 @@ running it, to determine its
```{admonition} Global variables
:class: tip
-A global variable can refer to any Python object. In particular, functions,
-classes, and imported names can all count as global variables.
+A variable can refer to any Python object. In particular, functions,
+classes, and imported names are all variables.
```
-
There is an edge from one cell to another if the latter cell references any
global variables defined by the former cell. The rule for reactive execution
can be restated in terms of the graph: when a cell is run, its descendants are
run automatically.
-
## Global variable names must be unique
To make sure your notebook is DAG, marimo requires that every global
diff --git a/docs/index.md b/docs/index.md
index fb1aa6bc96..a8b06b47fc 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,9 +2,18 @@
<img src="_static/marimo-logotype-thick.svg" width="210px">
</p>
-**marimo** is a reactive notebook for Python. It allows you to rapidly experiment
-with data and models, code with confidence in your notebook's correctness, and
-productionize notebooks as pipelines or interactive web apps.
+**marimo** is a reactive notebook for Python that models notebooks
+as dataflow graphs: run a cell or interact with a UI element, and marimo
+automatically runs affected cells. Every marimo notebook is stored as pure
+Python, executable as a script, and deployable as an app.
+
+```{admonition} Built from the ground up
+:class: tip
+
+marimo was built from the ground up to solve <a
+href="/faq.html#faq-jupyter">well-known problems associated with traditional
+notebooks</a>.
+```
::::{tab-set}
:::{tab-item} install with pip
@@ -23,17 +32,19 @@ conda install -c conda-forge marimo && marimo tutorial intro
:::
::::
+Developer experience is core to marimo, with an emphasis on
+reproducibility, maintainability, composability, and shareability.
+
+
**Highlights.**
-- **reactive**: run a cell, and marimo automatically updates all affected cells and outputs
+- **reactive**: run a cell and marimo automatically runs affected cells and updates their outputs
- **interactive**: bind sliders, tables, plots, and more to Python — no callbacks required
-- **reproducible**: no hidden state, deterministic execution order
+- **reproducible**: no hidden state, deterministic execution order — code with confidence in your notebook's correctness
- **deployable**: executable as a script, deployable as an app
- **developer-friendly**: git-friendly `.py` file format, GitHub Copilot, fast autocomplete, code formatting, and more
-_marimo was built from the ground up to solve many <a
-href="/faq.html#faq-jupyter">well-known problems associated with traditional
-notebooks_</a>.
+
> ⚡ marimo notebooks run automatically with interactions and code changes
@@ -59,7 +70,7 @@ notebooks_</a>.
</figure>
</div>
-> 🚀 deploy your creations as interactive web apps
+> 🚀 deploy as interactive web apps
<div align="center">
<figure>