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-build-wheel

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

If you run into a problem, run rm -rf .pixi and try again.

Running specific Python unit tests

pixi run -e py py-build && pixi run -e py pytest rerun_py/tests/unit/test_tensor.py

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.25.0-cp39-abi3-win_amd64.whl (76.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_x86_64.whl (95.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_aarch64.whl (91.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

rerun_sdk-0.25.0-cp39-abi3-macosx_11_0_arm64.whl (82.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

rerun_sdk-0.25.0-cp39-abi3-macosx_10_12_x86_64.whl (88.5 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file rerun_sdk-0.25.0-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.25.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a52ac7e99e3f5a7bf72e93f104c105314863958ee8167d83f36cf9fa1717fd37
MD5 fb9a69f07ed98a20e9838f7649ef3fbb
BLAKE2b-256 bd70da65f11cd535cc7c8c1fcd816f6d930019823ea0bc7e7cc6f20a446ef415

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00d3f827c109fe0516529891123190b066e6fc1b0f4d6b89e9b776769ee95f80
MD5 6a44e1dc93390e07d63d9da05213eb17
BLAKE2b-256 d9b67f16b5f603faa17a6d0cbbdb39f5bceafa9e70e0ef921ef184781121efad

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.25.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cda864571d1bdf7154407f8e737257021d1502786349a100c3eec6f69c2f0429
MD5 6f01f7e0773458ec198190ff01fe2240
BLAKE2b-256 40e9859379eedf4ea37da7dc0ca9bb8abd37637752058ddcae558c61bb019bec

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.25.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.25.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0acecc1797a27af5e345ba9d499ecbabb65dfd0b9e916edeb686cf4e9e8e1c2
MD5 1f453ac70f16cf0b585d090d0ae57bbe
BLAKE2b-256 bd12900cfa5ef70b0d7173f0405f042f4b26b5c63e9e6d4c6f51d98314c72297

See more details on using hashes here.

File details

Details for the file rerun_sdk-0.25.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.25.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dcb2a4fc8c487ee3be16eaccb9ae8b16677b333f3821ef641b82604e46f03ce8
MD5 05a5eba9ddc5489a8f97b8a14be5fd0a
BLAKE2b-256 ef0786d77a9e8b6665082a9152460c7816aca94e8e80061c316c51bf8164dda9

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