Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ Showcase basic usage and specific features of Rerun.
examples = [
# display order, most interesting first
"notebook",
"notebook_viewer",
"notebook_callbacks",
"clock",
"dna",
"graphs",
Expand Down
40 changes: 40 additions & 0 deletions examples/python/notebook_callbacks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--[metadata]
title = "Notebook: viewer callbacks"
tags = ["Notebook", "Interactive", "Callbacks", "3D"]
thumbnail = "https://static.rerun.io/notebook_callbacks/0daba8485bc0d589cfda3411db450db4bf2e8818/480w.png"
thumbnail_dimensions = [480, 339]
-->

## Overview

This notebook demonstrates how to react to user interactions coming from the embedded Rerun Viewer widget. It logs a dynamic 3D point cloud, listens for timeline, time, and selection events, and surfaces them in real time using Jupyter widgets.

You need the separate support package [`rerun-notebook`](https://pypi.org/project/rerun-notebook/) to use this feature. Typically this is installed using:

```bash
pip install "rerun-sdk[notebook]"
```

Check out the [minimal notebook example](https://rerun.io/examples/integrations/notebook) for a quick start.

## Background

This notebook spins up a colorful point cloud and pipes it into the viewer so you can experiment with callbacks in real time. As the camera, timeline, and selection change, [`Viewer.on_event`](https://www.rerun.io/docs/reference/sdk/rerun_notebook#rerun.notebook.Viewer.on_event) emits rich event payloads that we translate into friendly [`ipywidgets`](https://ipywidgets.readthedocs.io/) readouts.

Scrub the timeline, pick individual points, or activate entire views to see how each interaction updates the labels—handy for building responsive dashboards or debugging custom tooling around the Rerun Viewer.

## Running in Jupyter

First, install the requirements (this includes Jupyter, the Rerun SDK, and the notebook support package):

```bash
pip install -r requirements.txt
```

Then, open the notebook:

```bash
jupyter notebook notebook_callbacks.ipynb
```

Interact with the viewer by scrubbing the timeline and selecting points or views; the widgets underneath will update instantly to mirror the viewer state.
3 changes: 3 additions & 0 deletions examples/python/notebook_callbacks/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rerun-sdk[notebook]
ipywidgets
numpy
38 changes: 38 additions & 0 deletions examples/python/notebook_viewer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--[metadata]
title = "Notebook: viewer"
tags = ["Notebook", "Widget", "3D"]
thumbnail = "https://static.rerun.io/notebook_viewer/3e3bc9c7eede26db837fb317b7e2b2de77dfc777/480w.png"
thumbnail_dimensions = [480, 272]
-->

## Overview

This notebook shows the easiest way to embed the Rerun Viewer widget inside a Jupyter notebook. Instead of logging new data, it loads a pre-recorded `.rrd` file and renders the scene inline, making it perfect for demos, documentation, or quick inspections of existing captures.

You need the separate support package [`rerun-notebook`](https://pypi.org/project/rerun-notebook/) to use this feature. Typically this is installed using:

```bash
pip install "rerun-sdk[notebook]"
```

Check out the [minimal notebook example](https://rerun.io/examples/integrations/notebook) for a quick start.

## Background

In this notebook we are loading a pre-recorded `.rrd` file into the Rerun Viewer widget. The viewer streams the capture and allows you to interact with the 3D scene directly in your browser. You can orbit, zoom, and inspect the scene without needing to run any additional applications.

## Running in Jupyter

First, install the requirements (this includes Jupyter, the Rerun SDK, and the notebook support package):

```bash
pip install -r requirements.txt
```

Then, open the notebook:

```bash
jupyter notebook notebook_viewer.ipynb
```

When the notebook launches, the embedded viewer will stream the remote mesh capture so you can orbit, zoom, and inspect the scene directly inside the notebook.
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@
"source": [
"from __future__ import annotations\n",
"\n",
"from rerun_notebook import Viewer\n",
"from rerun.notebook import Viewer\n",
"\n",
"Viewer(\n",
" width=\"auto\",\n",
" height=\"auto\",\n",
" url=\"https://app.rerun.io/version/nightly/examples/raw_mesh.rrd\",\n",
" panel_states={\n",
" \"blueprint\": \"hidden\",\n",
" \"selection\": \"hidden\",\n",
" \"time\": \"collapsed\",\n",
" },\n",
")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "py",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -39,7 +34,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.10.11"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions examples/python/notebook_viewer/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rerun-sdk[notebook]