Skip to content

Publishing ​

Serve a notebook export directly when one URL identifies the complete result. Its index.json and assets form one immutable set of files.

When an application needs one stable URL while new exports arrive, serve a prepared manifest at that URL. The manifest names one immutable export and its selected state. Together, the manifest and opened export form a prepared publication.

mermaid
flowchart TD
    route[Stable application URL]
    manifest[Prepared manifest]
    export[Immutable notebook export]

    route --> manifest --> export

What each object keeps available ​

ObjectLifetime
Prepared stateReusable producer data for one complete input vector
Prepared exportLeased export generation for one exact ExportSpec
Notebook exportPortable index.json and assets opened by consumers
Prepared manifestSmall JSON record that selects an export URL, identity, inputs, and state fingerprint
Prepared publicationApplication lifecycle that keeps a selected export and state available

Python and browser APIs both expose a PreparedPublication type with different fields and owners. The Python object retains a prepared export plus application metadata. The browser object joins a validated manifest, opened notebook export, and selected exported state.

Serve one export directly ​

Serve a notebook export directly when one URL can identify the complete current result. Configure a replaceable index.json for revalidation and its content-addressed assets for long-lived caching.

Keep one URL while exports change ​

Use a prepared publication when the application needs a stable current route and immutable export instances. The producer keeps the last successful prepared export available. The current route returns a prepared manifest. Immutable routes serve that generation's index and assets.

The browser opens and validates a new export before showing it. If loading fails, the previous export stays visible. If refreshes overlap, only the newest may replace the current view. Dispose resources created by an older refresh.

Trust the manifest source ​

The prepared manifest pins the export's canonical index.json bytes by identity. Asset verification detects changed content after selection.

The application still authenticates the manifest route and export origin. An export on another origin also needs a matching Cross-Origin Resource Sharing (CORS) policy.

Related: Verification and trust separates file verification from publisher trust. Serve a prepared publication covers the complete workflow. The browser prepared reference defines controller, refresh, cancellation, and error contracts.

Released under the Apache 2.0 License.