Skip to main content

The Rerun Logging SDK

Project description

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 pixi for managing dev-tool versioning, download and task running. See here for installation instructions.

pixi run py-build

This builds the SDK for Python (use pixi run py-build --release for a release build).

You can then run examples via uv:

pixi run uv run examples/python/minimal/minimal.py

To build a wheel instead for manual install use:

pixi run py-build-wheel

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 py-test

If you run into a problem, run rm -rf .pixi .venv and try again.

Running specific Python unit tests

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rerun_sdk-0.31.0-cp310-abi3-win_amd64.whl (116.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_x86_64.whl (135.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_aarch64.whl (130.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

rerun_sdk-0.31.0-cp310-abi3-macosx_11_0_arm64.whl (121.4 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file rerun_sdk-0.31.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.31.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 07b6b17e308c9ad7ad23626b52da03db4650a0aa5f2b682323cbf564c12adc8b
MD5 31c30b13141cdd4fe1736566b1a1dd23
BLAKE2b-256 3f67e27f5641f5b8cbf966ddacde1f85881ae78172c611110e7d18aed9a356c4

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a37f22a069bd094ab46a40ed430a9216912b8e094e5bc824167b4812dbd55a6
MD5 2d4a8e9ef6d8c2cabc5acec8794120e7
BLAKE2b-256 c17fdc1fc2bfc89e32b75655442919332c2e57bc70dfd5a5ca9293e121f283d6

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.31.0-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 985b6f4e7be5820e51d15e2aa0ee8780014a7e4ea806297340bd8746a3a00ddb
MD5 523ebabe9c09b8cf01eb30382b60d4fa
BLAKE2b-256 2dc4a59f63eb1a14335d43d95de117f7a2bd721f3d57d17ec954f47f48043f5d

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.31.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.31.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e5e79efcaa675968d270d638a4967a71ab577fdc2848761c5b6f72c0e7f140f
MD5 ebf4d02a2bfb2657b3530f0d75171444
BLAKE2b-256 489281eb833dba018e4c4db25e421bf5235f0a2c42d4c1bbd22f287434e55446

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page