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

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


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

Uploaded CPython 3.8+ Windows x86-64

rerun_sdk-0.22.1rc1-cp38-abi3-manylinux_2_31_x86_64.whl (51.4 MB view details)

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

rerun_sdk-0.22.1rc1-cp38-abi3-manylinux_2_31_aarch64.whl (49.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

rerun_sdk-0.22.1rc1-cp38-abi3-macosx_11_0_arm64.whl (44.6 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rerun_sdk-0.22.1rc1-cp38-abi3-macosx_10_12_x86_64.whl (46.8 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file rerun_sdk-0.22.1rc1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rerun_sdk-0.22.1rc1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 afd6b4028fd700bd4a2cfe92bdda9f24c6e5448f665d31239d5099224323b642
MD5 65d3c0b3a074001dce8186d068beea10
BLAKE2b-256 2d67a6340ed8d3db9edc3ded39b7df6b37604d075a6da40a9cf8d660071b23e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.22.1rc1-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 be446337fbe793effcc8e0592fa6686cc7c9b863a15e4d48d17c84b4bdb39f8f
MD5 6b1e5997c7170463972f10bc20c804ee
BLAKE2b-256 920a3f5c7bff2fa1156816ba3d43538701f1680e1b9c5855802ded4bc8b7b34b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.22.1rc1-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 2d142d631e05842abd8a5859770c5948e267210c7ab10822bbfa677d1bfef148
MD5 f52b4001b40fc27f95676068d1dc7d19
BLAKE2b-256 7bbf668ac72e9bfd34c5d014d4d6789b2c39f15baadbf99ca46c105b332ba6a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.22.1rc1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15af4a032e8a3c7b491122c9459949f07edb79822c859f1cfee2c80b81bbd767
MD5 07dff3738760b59d226a009daa08c892
BLAKE2b-256 2d2e1c0afb169d56f642ba90659ca2d14acbbe1ab5c54b512981bbd2ae5628b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.22.1rc1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8f5b9680ac4621e65d7587ef836b9ced148976ee7d6def48f135fbae488626a3
MD5 b25d35da55af63ec13a295b56d60603c
BLAKE2b-256 773fc14de859a7c28a67a2c8758b6f0170996e2f093e450467c6a58c287883fd

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