Quickstart

This page installs Rerun, opens the Viewer, and walks through logging, visualizing, querying, and training.

Installation

pip install rerun-sdk[catalog,dataloader] bundles the SDK (log/query from code) and the Viewer (visualizer app). The optional dependencies support queries and training below. For Rust, C++, see Install Rerun and Set up a project.

Open the Viewer

rerun launches the Viewer. Pass a file to open it directly:

rerun path/to/recording.rrd

Supports .rrd, .mcap, and more. Also available in-browser at rerun.io/viewer.

Scale across many recordings

To query across recordings, log (or convert) data to an .rrd, start Rerun DB Local (or connect to hosted Rerun DB), register the .rrd as a segment, then visualize and query across recordings. See What is Rerun for how the pieces fit together.

Log

Save data to an .rrd, see the logging tutorial for more details. If you already have data in another format see Data conversion for various examples converting to .rrd.

import math

import rerun as rr

with rr.RecordingStream(
    "rerun_example_getting_started", recording_id="run-1"
) as rec:
    rec.save("run-1.rrd")
    for t in range(10):
        rec.set_time("step", sequence=t)
        rec.log("/arm/shoulder", rr.Scalars(math.sin(t * 0.5)))
        rec.log("/arm/elbow", rr.Scalars(math.cos(t * 0.5)))

Start Rerun DB Local

Start Rerun DB Local on port 51234, then connect from your code. If you use hosted Rerun DB, connect to it instead (see Run the examples on Rerun DB).

rerun server --temporary

Temporary storage is removed when the server stops; registered local files are not removed.

# `server_url` is the catalog URL — defaults to "rerun+http://127.0.0.1:51234"
# when running `rerun server` locally.
client = rr.catalog.CatalogClient(server_url)
# On Rerun DB, connect to your deployment instead:
# client = rr.catalog.CatalogClient("rerun://api.<stack>.cloud.rerun.io")

Ingest

Register an .rrd with a dataset so it shows up as a queryable segment.

dataset = client.create_dataset("demo", exist_ok=True)
# On Rerun DB, register from object storage:
# dataset.register(["s3://bucket/run-1.rrd"]).wait()
dataset.register([Path("run-1.rrd").absolute().as_uri()]).wait()

Visualize

Point the Viewer at your server to browse every recording in the catalog. See the Viewer overview.

rerun rerun+http://127.0.0.1:51234

Query

Query the catalog into a DataFusion DataFrame. See the query tutorial.

df = dataset.filter_contents(["/arm/**"]).reader(index="step")
print(
    df.select(
        "rerun_segment_id",
        "/arm/shoulder:Scalars:scalars",
        "/arm/elbow:Scalars:scalars",
    )
)

Train

Connect a Dataloader to the server to generate training batches. See the training tutorial.

from torch.utils.data import DataLoader

from rerun.experimental.dataloader import (
    DataSource,
    Field,
    NumericDecoder,
    RerunIterableDataset,
)

ds = RerunIterableDataset(
    source=DataSource(dataset=dataset),
    index="step",
    fields={
        "shoulder": Field(
            "/arm/shoulder:Scalars:scalars", decode=NumericDecoder()
        ),
        "elbow": Field("/arm/elbow:Scalars:scalars", decode=NumericDecoder()),
    },
)

for batch in DataLoader(ds, batch_size=4):
    print(batch)

Work with an agent

Coding agents such as Claude Code and Codex can log, convert, and inspect your data for you. See Skills, the MCP server, and the Viewer's agent panel.

If you're stuck