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.19.1rc4-cp38-abi3-win_amd64.whl (33.6 MB view details)

Uploaded CPython 3.8+ Windows x86-64

rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_x86_64.whl (41.3 MB view details)

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

rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_aarch64.whl (39.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

rerun_sdk-0.19.1rc4-cp38-abi3-macosx_11_0_arm64.whl (35.7 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rerun_sdk-0.19.1rc4-cp38-abi3-macosx_10_12_x86_64.whl (37.4 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file rerun_sdk-0.19.1rc4-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b7321194b1a4f279d2a71f50692dca51d2d838e67ed07daebb1c667ecb04c709
MD5 3287b4c3e3b70fd53dc01d2e2155ced6
BLAKE2b-256 a9527bfb5130e32443539f5ebe9cbb19886511cf48e882f9fdc4d2bed9698acb

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b030e1057ea03f88884210291d394f12def8e8db4859269329afe4a4d991ceac
MD5 6c3ce5c12393297acf74fb45fa232ff3
BLAKE2b-256 7b0af39c773e117af7e1afd4b2f76a70a2e7a865783dee5bcf60f6457e8b51dd

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc4-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 d7b1d1516938af63d58144c85cd63dfd70b4b44be0da9eb2448258c5c6547437
MD5 de7054f5c8fccb0ac76db50dd2c39956
BLAKE2b-256 d418f319627ddbdf4715734ccaf94d82d49532a93fa3be580d8825cbbb6ee722

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.19.1rc4-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05c0f7f7e1a10ba7d96dda464c0fe97491180cc4671881d42567b7d6b1d83602
MD5 171c73fd40286dcd94d24854b2c9a951
BLAKE2b-256 a8f914d53dabb4778cb235eef5bcb7539fc52104fc052dbf9fe62726390dbb7d

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.19.1rc4-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 77d02a8e3d4b3bdc07258a02316ba4beeb924ec1ed58dd0eb943447999b3965a
MD5 ed29b2b6a47fc6742b1c04e7f6a6fd67
BLAKE2b-256 2e59d7074985812a3e5a53afe5efb0d616461cd4729a5d5f8afeb9b86723b2bb

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