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


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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5d7950ed35cfa0ecaad302dbc2413354654dd0d5cd44e73cb55d05fa1ed0004d
MD5 2cd277f87f1e6725db569920a8a73293
BLAKE2b-256 c7465f0ab6fd81e4e109915a886f572648e47b1d159c4c5369c81c4b57089c55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 7a638d2009c5248ce61feadf283d1b10e98241e04a5834c8d27169a4401ed5b1
MD5 659703815789762a206069c92b701314
BLAKE2b-256 e491631883fdacd12630b0a37d42a6e8c87785b9c8cfba68aed21aa6e7c73723

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 caa7bef1e63bb1c95d0cf52812cf16855b80c7b1d0137b6c2ba9e5031c35c095
MD5 11fe9e28c8d8c4f88f0f8d9407abac5e
BLAKE2b-256 ede6086f38552edeaebd227a47711f67be2cee9f07483694278daab0f87321f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56bb01adf13308725b1534b93be21ad6234ecfa98db13227dc281a3cb8b41922
MD5 73751290bd96f5b3ba0bb06a0bd4121f
BLAKE2b-256 4e966e75b675d20ee584f3f3664aead70bc1736b958091c14b2a5a06f4f31881

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a61be3afea5ac856809bdff7234a21de308f149f92d5f4d4c532dcd5698de1c4
MD5 e992e22e5b2d450b4f59050228540b4b
BLAKE2b-256 48b02f91b886fd701e3ded8e3013852e833519f2e640b857e1b0c0883c7a7d37

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page