Skip to main content

Workbook API

Use the public boardflare package from notebook code:

import boardflare as bf

bf.ref(reference, headers=False)

Describe a workbook reference when options are needed:

bf.ref("Sales!A1:D20", headers=True)

headers=True treats the first row of a multi-cell reference as DataFrame column names.

bf.inputs(**references)

Declare reactive workbook dependencies:

inputs = bf.inputs(
sales=bf.ref("Sales!A1:D20", headers=True),
tax_rate="Assumptions!B2",
)
inputs

Display the returned widget as the cell result. Read values by key:

sales = inputs["sales"]
tax_rate = inputs["tax_rate"]
Workbook referencePython value
One cellScalar value
Multi-cell rangepandas DataFrame
Multi-cell range with headers=TrueDataFrame using first row as columns

bf.publish(outputs=None, functions=None)

Claim the notebook's live published registry:

bf.publish(
outputs={"summary": summary},
functions={"discount": discount},
)

Display the result so its Anywidget model remains connected. Published outputs/functions are session state; saving stores notebook source that recreates them.

BF.OUTPUT(name)

Read a published output from Excel:

=BF.OUTPUT("summary")

BF.FUNCTION(name, ...)

Invoke a function from the published function registry:

=BF.FUNCTION("discount", A1, B1)

Keep worksheet-callable functions short because synchronous Python execution can block the live notebook kernel while it runs.

API stability

The names on this page are the public notebook contract. Do not depend on Marimo private runtime modules, internal workbook bridge objects, iframe messaging internals, or generated wrapper functions.