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.3-cp310-abi3-win_amd64.whl (116.5 MB view details)

Uploaded CPython 3.10+Windows x86-64

rerun_sdk-0.31.3-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.3-cp310-abi3-manylinux_2_28_aarch64.whl (130.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

rerun_sdk-0.31.3-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.3-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.31.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 427b90d5157189f134b0e43d3378c83f548ac858cc0b81553ecb6df4b7977a40
MD5 1c860e43d65f3ea7e0a9530840803883
BLAKE2b-256 5d99f1d5ba615a282ae18919c1c3c1975cbd14c66032ed3c574ac0153fbbb567

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.31.3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b285dda76f4bf01d617204c09bab8543cddd224cc8fe159f3bf38458bf398998
MD5 e1652d8ce34c141c0d441449d1f43117
BLAKE2b-256 f7f4d4350829d5bd74005ff08b194a21c24a570c9db67d90c14ca29cf0b063bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.31.3-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 90deef848af60d544071e219ce2f608f64090a50b75d0cd951c24933a0260edd
MD5 1f8fb37db935d087907d7b96383c92ac
BLAKE2b-256 e28c219d612b61d2fde3731068cd3ba1ef1e9bb646e06923361574b52529fa96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.31.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3ed6c246edf6f809df5fbdaeafbb335d1295930b73d9d53b17e7d9fb1f5e8bc
MD5 6f22a76941b8bd0914c18d1fc000c2b4
BLAKE2b-256 6deb48ff09062919646bed150e76313debc7b815c23de12dbb999332fb0bddc2

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