rerun_py/README.md
The data primitives to build, understand, and improve your data loop. Designed for multi-rate, multimodal data, from the first recording to massive scale.
The open source Rerun Python SDK provides a single toolchain to log, transform, query, view, and train on multi-rate, multimodal data.
pip install rerun-sdk
The Python module is called rerun, while the package published on PyPI is rerun-sdk.
See Install Rerun for the Viewer and other SDK languages.
We also provide a Jupyter widget for interactive data visualization in Jupyter notebooks:
pip install rerun-sdk[notebook]
import numpy as np
import rerun as rr
rr.init("rerun_example_app", spawn=True)
positions = np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-5, 5, 10j)]]]).T
colors = np.vstack([rgb.ravel() for rgb in np.mgrid[3 * [slice(0, 255, 10j)]]]).astype(np.uint8).T
rr.log("points3d", rr.Points3D(positions, colors=colors))
The Viewer and Python logger can run in separate processes. Start the Viewer in one terminal:
python3 -m rerun
In a second terminal, run the example with the --connect option:
python3 examples/python/plots/plots.py --connect
Note that SDK and Viewer can run on different machines! See SDK operating modes for connection options.
Rerun uses pixi for development tools and tasks.
Install pixi, clone the repository, and run these commands from its rerun/ directory.
Build and install a development version of the Python SDK:
pixi run py-build
For an optimized build, use:
pixi run py-build-release
Run an example in the development environment:
pixi run uvpy examples/python/minimal/minimal.py
Build a wheel for manual installation:
pixi run py-build-wheel
See BUILD.md for all Viewer and SDK build options.
Development wheels built from the latest main branch are available from the prerelease release.
The main branch can be unstable, so use these wheels at your own risk.
Run the full Python test suite:
pixi run py-test
Build the SDK and run one test file:
pixi run py-build && pixi run uvpy -m pytest rerun_py/tests/unit/test_tensor.py
Install puffin_viewer, then set RERUN_PUFFIN=1 when you start a Python program:
cargo install puffin_viewer
RERUN_PUFFIN=1 pixi run uvpy your_script.py
Save a recording from the viewer for offline analysis (use the investigate-puffin skill in .claude/skills/).