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

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

rerun_sdk-0.20.0-cp38-abi3-win_amd64.whl (37.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_x86_64.whl (46.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ x86-64

rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_aarch64.whl (44.5 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

rerun_sdk-0.20.0-cp38-abi3-macosx_11_0_arm64.whl (40.0 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rerun_sdk-0.20.0-cp38-abi3-macosx_10_12_x86_64.whl (41.8 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file rerun_sdk-0.20.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9d5988769b6b668728b24303e0502d867ae2a8cd457e21d7da48d5a3ca2e1538
MD5 adbd04bfdec5bb1a03dea29f5ca82623
BLAKE2b-256 9b6b436de0d7b31331b925082784c34831a5bab41ad0bd6ff015bfb86bc634b8

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 dfaf0e4e60f9909366866a568e4786458b5cd85635f5740bbfe696e298c68a6a
MD5 119e04c4a17c7c78fe0b69b8dc06c9db
BLAKE2b-256 4463b5cfd5651747a58020d3fa29d943e7a70f268bec33e881c3cc15c622d9c6

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 75693f7a364e66579085aefe4f6035ec2ddf1c6c6e65838b9ce8975dc33d3d82
MD5 c4d346b697a894d2adec5b114fb556f8
BLAKE2b-256 350d65eb62dc9eb4330efb179f556485b4c6043f4e09d49bf9545d5773e8a60f

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.20.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4275f4260f1cf1acd326deb01efc70ac15a0009a72cd765d8361e026dc87ce8f
MD5 40a262c331c073f7adc7cac4c9ca5abb
BLAKE2b-256 0dabd4a5a596f9768a2ad0c392eea4e6136573fa1c6926359748d3a10399475d

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.20.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a3219692a9fde1021f6b249e2ed179b6b13a0b57972339a01086bd895d378e7b
MD5 274d3d1563ce395ee698277856b2b818
BLAKE2b-256 fb0658c8253f74d10ef55ff90668eee831a7bce8f727c616755383b89f398aef

See more details on using hashes here.

Supported by

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