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.1-cp38-abi3-win_amd64.whl (37.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

rerun_sdk-0.20.1-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.1-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.1-cp38-abi3-macosx_11_0_arm64.whl (40.0 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rerun_sdk-0.20.1-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.1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 82f60bce87e978cf0a282eb9599d9179b0de1d85299263ba04963126e0ae9021
MD5 df0216d0e22ef61c3aa1bb997985dece
BLAKE2b-256 0a68a98085125acab4fffed4ee942e21f301e0d7cc9b2142d0f442afe89803c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.1-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4c46297f51b609a48d9bcbff3408a7da0cfa5c65e4916ede1dc695ecec696cb8
MD5 79808557fb1a7dd8e7729265b06ea860
BLAKE2b-256 7b00451fb52916db3ce973ad8dd80111b92d6f96f4571af5d5cc15d39970506e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.1-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 2922d34f3167f47918198638d67bbfcd7980cdfd10d0036cca2a7236707967bf
MD5 5c68e6e48b08e72a4901f46b91e1b0f7
BLAKE2b-256 5db5883ccf8a08506b90bd1f761adb1aefbc60e11cc379b686a798fb7ab77d46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3eddb2f3a9b7e41fc8db1fe3814d2bc20b03b48b13e76f5e3eb17d398fe0016
MD5 0b62c1e48751be72fd6f438e0dc7064e
BLAKE2b-256 537ef3fb97215afce988aa3c6985977d953f0bf9047ef27d2d97b4f520eaeed7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6bca20addddb3e2c69323c4f15b0e1270d1c92959c62641eb9b0eddf4420f206
MD5 9a89974e12a634c400f4610114d3542f
BLAKE2b-256 55ff59902b02994d9a14c5246e4028ea1dcfbec1c50641d6fc40923a04b9c6d1

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