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.0rc1-cp38-abi3-win_amd64.whl (37.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rerun_sdk-0.20.0rc1-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.0rc1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.20.0rc1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e046a0b328a74053eefca86aa888c9a94fad279fc8eee6e9c4d3a849f7d664bb
MD5 39e479459213769189ef540de1e35850
BLAKE2b-256 a2227f6e38c311a71936a20975d4048c7fd2ff454b84add986b0bdfb0870d5c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.0rc1-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 10b1237b9ff8b06f8b7504887988ff674a028a8bf275ee972a40449207189ed3
MD5 ee8ea8aba6ee1ac2159c93922f7c4a92
BLAKE2b-256 4cae63caacdbba4e1a0c791f395857ac58d869aebd8ccb605230c9d8c13411a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.0rc1-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 133f5423b75d62b44f928b4a31e3b0db72eb09c01c382ea11dfd3303b1681781
MD5 f900a190b22127de306a4d30c2993b5b
BLAKE2b-256 b6a053f2324db89b4050b366d8583cb26a9f2c25d0b3910acd50aa57a40bd531

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.0rc1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eaaf3eb0e6a4ae4bf2cea150979544f3118a1cf887ecab2eacb33cd53fed7344
MD5 ae2add44e1e2e17dc3b588ca7c76f209
BLAKE2b-256 08cc07621c4fe82c17937dadc88a195db508c5c65e4031d44982471df99f809a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.0rc1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 829827e9c06a17aa03a36d8ec1087c6693597e609c78f6a331ad927807c03a27
MD5 2f21960874f47085b7ca2bc93cf087f7
BLAKE2b-256 1ad2b701887efe4c9932d593f7403e932cfdfca20b17656f5e63d7e0dcdb8ef1

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