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.20.1rc1-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: rerun_sdk-0.20.1rc1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 37.5 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 | 351cd736c93d72f161aef7df3e9334b7b49b9bea87cc4d12d07b07bea55af597 |
|
MD5 | 098aa587fde0b97b26bda2861a89891c |
|
BLAKE2b-256 | 9dbd4aa5ac25dbd25cdc982cf29b3bf950d6fc236c8a474e68ce653eba3a809b |
File details
Details for the file rerun_sdk-0.20.1rc1-cp38-abi3-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: rerun_sdk-0.20.1rc1-cp38-abi3-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 46.0 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 | e86a41ec579945b986e8af3d431b40d1a2b892d384888f8637b4f61cdcb7f077 |
|
MD5 | 1da72cfbf017e75e53f05c5354f9fc47 |
|
BLAKE2b-256 | 57f64ed4240ed9ddf3df27f31ea686e17fe73ef55e528d3f8e8de3fdd0edaea1 |
File details
Details for the file rerun_sdk-0.20.1rc1-cp38-abi3-manylinux_2_31_aarch64.whl
.
File metadata
- Download URL: rerun_sdk-0.20.1rc1-cp38-abi3-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 44.5 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 | e9f7b0b75f2c98a10c72992fa7beb035144d7b165d5ccb41e624ad6bd636a93e |
|
MD5 | 08404fa0d92fdf201cc35a1789277903 |
|
BLAKE2b-256 | 24177c084495e4ebe0fed36eef0107b0f1d4ffc6a67ccdd80c14906384654e32 |
File details
Details for the file rerun_sdk-0.20.1rc1-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: rerun_sdk-0.20.1rc1-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 40.0 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 | 4a25477dc1180aab39dec41dc4c43644c9a94c13d9589c9409b160f2633a54e7 |
|
MD5 | a0bc3a4c03d638955c21da6cc8632120 |
|
BLAKE2b-256 | d5599ad72e0e07fea1a4fe9ac26f1c8a588b67c1b1364784b6e0e733fb164b0a |
File details
Details for the file rerun_sdk-0.20.1rc1-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: rerun_sdk-0.20.1rc1-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 41.8 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 | 26abfd29b2324854c9cfd4e09836a3e0de67bc24c7b31e16e9bb9e98df1e399c |
|
MD5 | 886086a90a9a35be4d1c32ce3f2fe64f |
|
BLAKE2b-256 | b227d695b3516f1d8e1badcc4eb60884be964fe73847341025bb5660f2a4dbb1 |