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.
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
Built Distributions
File details
Details for the file rerun_sdk-0.19.1rc3-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: rerun_sdk-0.19.1rc3-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 33.6 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f471380432b87f4f4423bed290c35b4602ca06fa77edda9d5f8717a0334f248e |
|
MD5 | dc4a793072cc48082c3de851da0a86ef |
|
BLAKE2b-256 | 5a00236c4fac56cab0dc2689f0972229713d2e938500d77a8920c735d313fbfb |
File details
Details for the file rerun_sdk-0.19.1rc3-cp38-abi3-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: rerun_sdk-0.19.1rc3-cp38-abi3-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 41.3 MB
- Tags: CPython 3.8+, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5b01fea791d0bd9a4944af198c75d4513d46f2daa460427e98cd4eba24dbeeb |
|
MD5 | 2aa090a77188a65c0e6628e115b6ff63 |
|
BLAKE2b-256 | 6fc934a9df49fca11027a4e06461bafcefe31071fdddb01b98ce89b5691975d3 |
File details
Details for the file rerun_sdk-0.19.1rc3-cp38-abi3-manylinux_2_31_aarch64.whl
.
File metadata
- Download URL: rerun_sdk-0.19.1rc3-cp38-abi3-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 39.8 MB
- Tags: CPython 3.8+, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980d9e887d1181b91f2e9a9a004eed40935d89fada3261d461d7fcaf57833815 |
|
MD5 | 39b188fc72847e4ecc82600a51f2b387 |
|
BLAKE2b-256 | 444d4a4e69a1beb363ea794fdff15e19e676cd3b4a5481678eb2e30ab0c1a11b |
File details
Details for the file rerun_sdk-0.19.1rc3-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: rerun_sdk-0.19.1rc3-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 35.7 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66dad32704c0bf70c00dc626927e8bf79941bc0004b5e8cf94e7a8cb224a25b9 |
|
MD5 | 46bdeb4797ae72bddff3ab2fe5c026a6 |
|
BLAKE2b-256 | fdbda1df92b86a855b5f2fb5cb088111d847b7b61cbc06b787d3dba29e615cdf |
File details
Details for the file rerun_sdk-0.19.1rc3-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: rerun_sdk-0.19.1rc3-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 37.4 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5de411e9d14991aa4da27e45fbd90c4c678ca077bcf2b5e98cede90bb4743381 |
|
MD5 | 03a21ef4ed8871dabb19305104e3dd85 |
|
BLAKE2b-256 | 5966525e5ff332c42f3f210861b784e56fed64ac2af572937f80b1f256d583d7 |