Skip to content

Notebook Quickstart

Strata Notebook is an interactive notebook with content-addressed caching, automatic dependency tracking, and cascade execution.

1. Start the Server

docker compose up -d --build
uv run strata-server

Open http://localhost:8765.

2. Create a Notebook

Click New Notebook on the landing page. Choose a name and parent directory.

Each notebook gets its own Python environment (managed by uv), so packages installed in one notebook don't affect others.

3. Write and Run Cells

Add a cell and type:

x = 1
x + 1

Press ++shift+enter++ to run. The result appears below the cell.

4. Multi-Cell Dependencies

Add a second cell:

y = x * 10
print(f"y = {y}")

Strata automatically detects that this cell references x from the first cell. The DAG in the sidebar shows the dependency arrow.

Cascade execution

If you change the first cell and re-run the second, Strata detects the staleness and offers to cascade-execute both cells in the correct order.

5. Rich Display Outputs

Markdown

The Markdown helper is injected into every cell's namespace:

Markdown("# Hello\n\n- item one\n- item two")

Matplotlib

import matplotlib.pyplot as plt

plt.plot([1, 2, 3], [1, 4, 9])
plt.show()

Install matplotlib first

Open the Environment panel in the sidebar and add matplotlib before running plot cells.

Multiple Outputs

A cell can produce multiple visible outputs:

display(Markdown("## Summary"))
42

DataFrames

import pandas as pd

df = pd.DataFrame({
    "name": ["Alice", "Bob", "Carol"],
    "score": [95, 87, 92],
})
df

DataFrames render as scrollable tables with column headers and row counts.

6. Manage Packages

Open the Environment panel in the sidebar to:

  • Install and remove packages
  • Import from requirements.txt
  • Export dependencies
  • Sync or rebuild the environment

See Environment Management for details.

7. Caching

When you re-run a cell with the same inputs and source, Strata returns the cached result instantly. The cell shows a ⚡ cached badge with timing.

Change the source or any upstream cell, and the cache is automatically invalidated.

8. Try an Example

Example notebooks must live under the configured notebook storage root (STRATA_NOTEBOOK_STORAGE_DIR, default /tmp/strata-notebooks).

Copy one of the bundled examples there first:

cp -R examples/iris_classification /tmp/strata-notebooks/

Then use Open Existing and open:

/tmp/strata-notebooks/iris_classification

Other bundled examples:

examples/pandas_basics
examples/titanic_ml

Cell Operations

Action How
Run cell ++shift+enter++ or ▶ button
Add cell + button in gutter or header
Delete cell × button in gutter
Duplicate cell button in gutter
Move cell / buttons in gutter
Keyboard help Press ++question++

What's Next