Skip to content

Outputs ​

The quickstart computes the same information in two forms:

Notebook resultOutput nameStored asReader receives
summary dictionarysummaryPortable JSON in index.jsonStructured data
Rendered reportreportRendered output in an asset fileRendered output record

An output is a published name and stored form available in every exported state. The notebook value before publication is a notebook result.

The quickstart app reads both outputs from the selected state. summary supplies structured data while report supplies the rendered notebook result.

Open Static applicationNo Python runtime or notebook sourceSource Notebook ExportSpec Application
Loading exported app…
mermaid
flowchart TD
    result[Notebook result]
    output[Named output and format]
    storage[Inline value or asset]
    reader[Reader or loader]

    result --> output --> storage --> reader

Choose the notebook value ​

Each output source chooses what the producer captures:

Source kindSelected result
jsonPortable Python value
nativeValue supported by marimo's cache
exportPython value converted by an exporter
outputValue formatted by marimo
cellComplete named or inspected cell record

The quickstart uses json for summary and output for report. Selected-value sources begin with a Python definition name and can follow supported attribute or item steps. A cell source identifies the complete cell.

Each output is captured separately ​

marimo-export captures each named output separately for every state. This output-specific capture is called a projection.

Separate resource identifiers let a consumer display several outputs together without collisions.

A representation tells readers how to decode an output ​

Each output records a codec and media type. Together they define its representation. The output descriptor also records:

  • provenance for the stored Python value
  • an inline value or content-addressed asset reference

An exporter can convert a selected Python value into a BlobAsset with bytes, media type, optional filename, and portable metadata. Built-in exporters cover text, HTML, Parquet, Altair, PNG, AnyWidget, and versioned JSON assets.

Consumers load, then optionally mount ​

Python readers use representation-specific accessors such as json(), asset_bytes(), and blob_asset(). Browser readers load through an explicit output loader:

ts
const summary = await state.output("summary").load(jsonLoader());
const report = await state.output("report").load(marimoOutputLoader());

Loading verifies the selected asset before decoding it. The report loader returns an inert rendered-output snapshot. Other loaders can return a value with mount(element).

Mounting attaches an interactive value to the document and grants its code the page's authority. Dispose the mounted view before replacing it or tearing down the page.

Related: Reuse explains when the producer creates these outputs. Output representations lists every source, exporter, loader, peer dependency, and media contract.

Released under the Apache 2.0 License.