Skip to main content

The Rerun Python SDK

Use the Rerun SDK to record data like images, tensors, point clouds, and text. Data is streamed to the Rerun Viewer for live visualization or to file for later use.

Rerun Viewer

Install

pip3 install rerun-sdk

ℹ️ Note: The Python module is called rerun, while the package published on PyPI is rerun-sdk.

For other SDK languages see Installing Rerun.

We also provide a Jupyter widget for interactive data visualization in Jupyter notebooks:

pip3 install rerun-sdk[notebook]

Example

import rerun as rr
import numpy as np

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))

Resources

Logging and viewing in different processes

You can run the Viewer and logger in different processes.

In one terminal, start up a Viewer with a server that the SDK can connect to:

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!

Building Rerun from source

We use the pixi for managing dev-tool versioning, download and task running. See here for installation instructions.

pixi run py-build --release

To build SDK & Viewer for Python (or pixi run py-build for a debug build) and install it in the Pixi environment.

You can then run examples from the repository, either by making the Pixi shell active with pixi shell -e py and then running Python or by using pixi run -e py, e.g. pixi run -e py python examples/python/minimal/minimal.py.

Respectively, to build a wheel instead for manual install use:

pixi run py-wheel --release

Refer to BUILD.md for details on the various different build options of the Rerun Viewer and SDKs for all target languages.

Installing a pre-release

Prebuilt dev wheels from head of main are available at https://github.com/rerun-io/rerun/releases/tag/prerelease.

While we try to keep the main branch usable at all times, it may be unstable occasionally. Use at your own risk.

Running Python unit tests

pixi run -e py py-build && pixi run -e py py-test

Running specific Python unit tests

pixi run -e py py-build && pixi run -e py pytest rerun_py/tests/unit/test_tensor.py

Release files for rerun-sdk 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for rerun-sdk 0.22.0
File
rerun_sdk-0.22.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_x86_64.whl CPython 3.8 abi3 Linux glibc 2.31+ x86-64 Details
rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_aarch64.whl CPython 3.8 abi3 Linux glibc 2.31+ ARM64 Details
rerun_sdk-0.22.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
rerun_sdk-0.22.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 234.5 MB

Release files / rerun_sdk-0.22.0-cp38-abi3-win_amd64.whl

Download URL rerun_sdk-0.22.0-cp38-abi3-win_amd64.whl
Size 42.1 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5b904b561c8e061af15dd46be7e9ba7d29edaa207c9e54e3af0688b047bdb311
BLAKE2b-256 checksum
How to use checksums
ac9b77d6411e1c72f71ed117d68930b9e195f7b6d0bc20fd861cd372ab4e3354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_x86_64.whl

Download URL rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_x86_64.whl
Size 51.4 MB
Tags CPython 3.8 Linux glibc 2.31+ x86-64 abi3
SHA-256 checksum
How to use checksums
e954fc1ade1ff74670904bb72c5d974983efb213943c7cb8fbb530fea8fa8080
BLAKE2b-256 checksum
How to use checksums
24aaa80c3205b047b789f63858d768d278607a1e19e8a9d78adc8904814d7a87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_aarch64.whl

Download URL rerun_sdk-0.22.0-cp38-abi3-manylinux_2_31_aarch64.whl
Size 49.8 MB
Tags CPython 3.8 Linux glibc 2.31+ ARM64 abi3
SHA-256 checksum
How to use checksums
2c8f8cc2178ba77eafa6a66ccea2b732f555f210d0cfba3be21194fd6af474a7
BLAKE2b-256 checksum
How to use checksums
796ecb2b6d1fa4f524a880e267847937237084b810f0125c71a8d87eaf50e3c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / rerun_sdk-0.22.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL rerun_sdk-0.22.0-cp38-abi3-macosx_11_0_arm64.whl
Size 44.5 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
50224ae88db978aae4583f238e4a438d7a06c7e6e4d42b28d5af378cf377b290
BLAKE2b-256 checksum
How to use checksums
20daad5ff8beb000824eb47d0d0722570e1a82056b7d5da724c65da3995e3dac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / rerun_sdk-0.22.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL rerun_sdk-0.22.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 46.8 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2ccdeb7beb236d7a4214b742bc308c291eca9488bcaa11d59cd3ddebab578fbf
BLAKE2b-256 checksum
How to use checksums
f0a5e633716493189f38caae680280343a05e0d28529a5a5cd3349d3ab58fc5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release history Release notifications | RSS feed

0.38.1

4 release files

0.38.0

4 release files

0.37.2

4 release files

0.36.3

4 release files

0.36.2

4 release files

0.36.1

4 release files

0.36.0

4 release files

0.35.0

4 release files

0.33.1

4 release files

0.33.0

4 release files

0.32.2

4 release files

0.32.1

4 release files

0.32.0

4 release files

0.31.4

4 release files

0.31.3

4 release files

0.31.1

4 release files

0.31.0

4 release files

0.30.2

4 release files

0.30.0

4 release files

0.29.2

4 release files

0.29.0

4 release files

0.28.1

4 release files

0.28.0

4 release files

0.27.2

4 release files

0.27.1

4 release files

0.27.0

4 release files

0.26.2

5 release files

0.26.1

5 release files

0.26.0

5 release files

0.25.1

5 release files

0.25.0

5 release files

0.24.0

5 release files

0.23.4

5 release files

0.23.3

5 release files

0.23.1

5 release files

0.23.0

5 release files

0.22.1

5 release files

This release

0.22.0 This release

5 release files

0.21.0

5 release files

0.20.2

5 release files

0.20.1

5 release files

0.20.0

5 release files

0.19.0

5 release files

0.18.2

5 release files

0.18.1

5 release files

0.18.0

5 release files

0.16.1

5 release files

0.16.0

5 release files

0.15.1

5 release files

0.14.1

4 release files

0.14.0

4 release files

0.13.0

4 release files

0.12.1

4 release files

0.11.0

4 release files

0.10.0

4 release files

0.9.1

4 release files

0.9.0

4 release files

0.8.2

4 release files

0.8.1

4 release files

0.8.0

4 release files

0.7.0

4 release files

0.6.0

4 release files

0.5.1

4 release files

0.5.0

4 release files

0.4.0

4 release files

0.3.1

4 release files

0.3.0

4 release files

0.2.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page