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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc6-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 91d75e5e229b1614f291110ae2a75241ec10427bb796f6b62396eca3d8c1d506
MD5 443b2a8c3cb3f00ae222f3a11842cdf8
BLAKE2b-256 4e1cdce937bd3a8d89b31831a8a30eb805a1894c6fa9381e928c1d1611277664

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc6-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9792b816222751f5a63cc9308a79f187dcfc5ff8deb0b8366fc46453f760fb09
MD5 d7ad59b3e6faba506f36147b644fdf4b
BLAKE2b-256 5a33220aca759075ea6fdea57182e34e02993dcdf88fc7d282f5714fd2175c7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc6-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 8550f8c7704818a4eaf5b5b2db3469eecd158c072b3ea8236454ae3ba231eb87
MD5 a60e385129993116cb3d47405809e841
BLAKE2b-256 0ad7f6a8a376b25448c8cd4626fdb6a38e4cfef6d2497aad0cb5cb5f6de19a2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc6-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 443d29e4be626d694f402a077c4057ee8e89e4f5f35f24f3a230e4976e7dd893
MD5 95263396334fb2b4531e4a0b7a5fb7c1
BLAKE2b-256 438e4ffb5559c9affb189fcae37995a865e6d7d3c7aba811dc5feafae8155ebe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rerun_sdk-0.19.1rc6-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0aa6c5e7a846f0d473385307f430a4a53c68f23d4db4a823d76ae840c75944b2
MD5 9ab0abdcdafbebc48d4ddea9e79c7601
BLAKE2b-256 dfcb1a938dbbb557e879677649817953a7a04d0d1c4876b755ee488e972d09ea

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