ALL INTELLIGENCE
Hacker News AIT2·Tools

Reaktiv Workbook Launches Open Source Python Cell Spreadsheet

Original title: Reaktiv Workbook – A spreadsheet where every cell is Python
62AI Score

Reaktiv Workbook is an open-source (MIT) tool that fuses the spreadsheet cell model with Python: every cell is Python code, and changing a parameter recomputes only the dependent values, plots and paragraphs in dependency order, eliminating hidden state and out-of-order runs. It works with NumPy, pandas, scikit-learn, Plotly and more, and ships a CLI for editing, running, CI checks plus MCP and sandbox modes.

Full Report

Contents23 sections

Change a parameter and every value, plot and paragraph that depends on it updates. Nothing else reruns, nothing goes stale. Notes, a grid of cells and a dependency graph over one plain .workbook.py file.

Try it in your browser Browse examples

uvx reaktiv-workbook new --from welcome or pip install reaktiv-workbook

Open source · MIT · PyPI · GitHub

Works with your stack: NumPy, pandas, scikit-learn, Plotly, Matplotlib, anywidget, and anything you can pip install.

Explore faster, without the stale state.

No hidden state

Cells update like spreadsheet formulas: change an input and everything that reads it recomputes, in dependency order. No “run all”, no stale variables, no out-of-order surprises.

Everything on one screen

A spreadsheet-style grid puts inputs, intermediate results and plots side by side, so a whole analysis or dashboard fits on one screen instead of a long scroll.

See why it changed

The dependency graph is drawn from your code. Follow a parameter to every value and plot it affects, or select a cell to see only its connections.

Notes that stay true

Markdown with live values, LaTeX, sliders and figures. The explanation reads from the cells, so it cannot drift from the numbers.

Share it as an app

reaktiv-workbook run serves the notes and controls as an interactive app for colleagues. Nothing to rewrite.

AI in the loop

With --mcp, Claude Code, Cursor or any MCP client works in your live workbook while you watch: new cells, another approach, a plot. Every change is one undo step.

Model fitting in the Cells view: inputs, data, model and error cells next to three plots

Cells Inputs, data, model, errors and plots of the model-fitting example on one screen.

The dependency graph of the model-fitting example: inputs on the left, data and model in the middle, plots and the note on the right

Dependency graph What depends on what, drawn from the code.

Signals at the core

Underneath is reaktiv, a signals library for Python. Signals keep the state of modern UI frameworks consistent with very little code; here they keep a model consistent while you change it.

  1. Reading is subscribing. A cell depends on exactly what it reads while it runs. Nothing to declare or wire up, and a branch that is not taken is not a dependency.
  2. Only what is affected reruns. A change marks the cells that read it as stale; they recompute in dependency order, and a result that comes out the same stops the update there.
  3. Lazy and cached. A derived value is computed when something needs it and reused until one of its inputs changes.
  4. Side effects are explicit. Formulas only compute. Writing files, calling services and changing inputs happen in effects and actions, where you can see them.
PYTHON
# plain reaktiv, in any Python program
from reaktiv import computed, effect, signal

price = signal(3.5)
cups = signal(120)
revenue = computed(lambda: price() * cups())
report = effect(lambda: print(f"revenue: {revenue()}"))
# revenue: 420.0

price.set(4.0)   # revenue: 480.0
cups.set(120)    # unchanged: nothing reruns

Input

signal

State you change: a parameter, a slider, a list of rows.

Formula

computed

Derived from other cells in ordinary Python, from one expression to a pandas pipeline or a figure.

Linked input

linked signal

A suggested value derived from other cells that you can override, and reset.

Resource

resource

A value that arrives later: a file, a query, an API call. It reloads when its parameters change and reports loading and errors.

Effect

effect

Runs when what it reads changes: write a file, send an alert, log a result.

Action

method

A step you trigger from a button or an agent, such as importing data or resetting a scenario. It can change inputs.

Examples you can run now

Each opens in your browser with Python running locally through Pyodide: nothing to install, nothing uploaded. Move a slider and watch it propagate.

[

Model fitting

Change the polynomial degree, noise and sample size; watch underfitting and overfitting happen.](https://workbook.bui.app/app/?example=model-fit.workbook.py) [

Sales report

Pick a region and channel, set a growth target; KPI tables and charts follow.](https://workbook.bui.app/app/?example=sales-performance-dashboard.workbook.py) [

Plotly explorer

A region filter and a growth slider drive interactive Plotly figures.](https://workbook.bui.app/app/?example=features/plotly-dashboard.workbook.py) [

Signal lab

Recover a tone from interference and noise; time, spectrum and filter plots follow.](https://workbook.bui.app/app/?example=signal-lab.workbook.py) [

Wave laboratory

A custom anywidget with an animated tracer; cells follow it.](https://workbook.bui.app/app/?example=wave-laboratory.workbook.py) [

Live monitor

Poll a sensor on a timer, keep a trend, alert above a limit.](https://workbook.bui.app/app/?example=scheduled-pipeline.workbook.py)

New here? Start with the five-minute welcome tour →

Questions

How is this different from a notebook?

A notebook runs cells in the order you execute them, so what you see can depend on what you ran before. Here cells are named and read from each other; the runtime keeps every result consistent with its inputs, so what you see is always what the code computes. The same file is shown as notes, as a grid of cells and as a dependency graph.

Does it use my own Python and packages?

Yes. reaktiv-workbook edit runs on your machine, in your environment. A workbook also lists the packages it needs in its header; --sandbox installs them into an environment of its own with uv.

Is my data uploaded anywhere?

No. In the browser, Python runs locally through Pyodide. On your machine, the editor talks only to the local Python process it was started from.

Where is my work saved?

In one .workbook.py file: plain Python you can review in a pull request, diff in Git and run with python.

On your machine

The command line opens the same editor on your files, with your Python and your packages.

PYTHON
# model-fit.workbook.py (simplified excerpt)
class ModelWorksheet(Worksheet["ModelFittingWorkbook"]):
    degree = cell("A1", field(3), label="degree")

    @cell("B4", label="model")
    @computed
    def model(self):
        train = ~self.is_test()
        return np.polynomial.Polynomial.fit(
            self.x()[train], self.y()[train], self.degree())
Text
$ uvx reaktiv-workbook new --from model-fit # try it
$ uv tool install reaktiv-workbook # or pip install
$ reaktiv-workbook edit model.workbook.py
$ reaktiv-workbook run model.workbook.py   # an app
$ reaktiv-workbook check model.workbook.py # in CI
$ reaktiv-workbook edit model.workbook.py --mcp # AI
$ reaktiv-workbook edit model.workbook.py --sandbox # its packages, via uv