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

If you're not sure about the file name format, learn more about wheel file names.

rerun_sdk-0.20.2-cp38-abi3-win_amd64.whl (36.5 MB view details)

Uploaded CPython 3.8+Windows x86-64

rerun_sdk-0.20.2-cp38-abi3-manylinux_2_31_x86_64.whl (45.0 MB view details)

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

rerun_sdk-0.20.2-cp38-abi3-manylinux_2_31_aarch64.whl (43.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.31+ ARM64

rerun_sdk-0.20.2-cp38-abi3-macosx_11_0_arm64.whl (39.0 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

rerun_sdk-0.20.2-cp38-abi3-macosx_10_12_x86_64.whl (40.8 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5ff1f5441299ffe4307e1c2e59592bd498e15b39c6116d346ff1a1e9618ebd4f
MD5 3b461b832268a4e06d3d1528e22898d8
BLAKE2b-256 9c048255b3bd802906d8e9d6845f301d4142398c2a273d64ea353b4438b48207

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.2-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b448636d13cd8d7b7b3892113709ac1e94d285496345226d0d4b004e85007f31
MD5 4650f5efb77d64b3b39555add92752bc
BLAKE2b-256 a8bd43a042b07882e516104048ff6384840cfb6cc08d3ebd8b5d9148ce2ec6c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.2-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 ded02ec65ea36ceb18880c2bcf70a0606644ffc1da1d21c5ebef7bafd4e92292
MD5 46190ef3b2c5975963def0e33ede652d
BLAKE2b-256 498d200246d82923dd23b1cd7ea48699604738e2648b3be5abc35afc60557ed2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 09ad76d2554ddb5f822177040001d88302b085cd405e03664452b56a1228d3e7
MD5 48f039b2ed878363f2e3c8306fd3967e
BLAKE2b-256 147157dcee8bcbb6ce6800337c38c7e86a9b14a69ccd9df804053605fedadf60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.20.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 19a55f96f76669661b0ca0de611ce7a2155fc34a03bfdc157704f75b2344578e
MD5 afadf9718188cdf5e3b9f4e4a26422b9
BLAKE2b-256 3a3307f3b0bbf52b7ec35f75b542c4695a1dec759485d8a09ab7431b6abebf9c

See more details on using hashes here.

Supported by

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