{"id":4237,"library":"rerun-sdk","title":"Rerun Python SDK","description":"The Rerun Python SDK is an open-source library for logging, storing, querying, and visualizing multimodal and multi-rate data. It provides Python APIs to stream data like images, tensors, point clouds, and text to the Rerun Viewer for live visualization or to a file for later use. It is currently in active development, with frequent releases, and is particularly useful in areas like robotics, simulation, and computer vision, aiming to help users understand and improve complex processes involving rich, time-aware multimodal data.","status":"active","version":"0.31.2","language":"en","source_language":"en","source_url":"https://github.com/rerun-io/rerun","tags":["robotics","computer vision","visualization","logging","debugging","3d","multimodal-data","spatial-ai"],"install":[{"cmd":"pip install rerun-sdk","lang":"bash","label":"Install Rerun Python SDK (includes Viewer)"},{"cmd":"pip install rerun-sdk[notebook]","lang":"bash","label":"Install with Jupyter Notebook support"}],"dependencies":[{"reason":"Commonly used for preparing data (e.g., point clouds, images) before logging with Rerun. Not a direct dependency but almost universally used in examples and real-world applications.","package":"numpy","optional":true}],"imports":[{"note":"The PyPI package is `rerun-sdk`, but the Python module to import is `rerun`.","symbol":"rerun","correct":"import rerun as rr"}],"quickstart":{"code":"import rerun as rr\nimport numpy as np\n\n# Initialize Rerun with an application ID and spawn the viewer.\n# The 'spawn=True' argument will automatically open the Rerun Viewer application.\nrr.init(\"my_first_rerun_app\", spawn=True)\n\n# Generate some example 3D data (a grid of points with colors).\nSIZE = 10\npos_grid = np.meshgrid(*[np.linspace(-5, 5, SIZE)] * 3)\npositions = np.vstack([d.ravel() for d in pos_grid]).T\n\ncol_grid = np.meshgrid(*[np.linspace(0, 255, SIZE)] * 3)\ncolors = np.vstack([c.ravel() for c in col_grid]).astype(np.uint8).T\n\n# Log the 3D points with colors to an entity named 'my_points'.\nrr.log(\n    \"my_points\",\n    rr.Points3D(positions, colors=colors, radii=0.5)\n)\n\nprint(\"Logged 3D points. Check the Rerun Viewer!\")","lang":"python","description":"This quickstart logs a grid of colored 3D points to the Rerun Viewer. It initializes the SDK, generates synthetic data using NumPy, and then uses `rr.log` to send the `Points3D` archetype to the viewer. The `spawn=True` argument automatically launches the Rerun Viewer application."},"warnings":[{"fix":"Refer to the official migration guides and CHANGELOG for specific version updates and API changes. Regularly update and test your code against new releases.","message":"The Rerun SDK is under active development and the API is still evolving. Expect breaking changes between minor versions, especially prior to a 1.0 release. Recent breaking changes (around 0.30/0.31) included updates to gRPC-based viewer communication, the `.rrd` file format, and connection methods.","severity":"breaking","affected_versions":"<=0.31.x (pre-1.0)"},{"fix":"Always use `import rerun as rr` (or `import rerun`) in your Python code.","message":"The PyPI package name is `rerun-sdk`, but the Python module to import is simply `rerun`. Using `import rerun_sdk` will result in an `ImportError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider optimizing your logging frequency, downsampling large datasets, or using more efficient archetypes for high-volume data. Monitor viewer performance and adjust data complexity as needed.","message":"The Rerun Viewer might experience slowdowns when visualizing an excessive number of entities or very large point clouds (multi-million points).","severity":"gotcha","affected_versions":"All versions"},{"fix":"For concurrent data output, use `rr.set_sinks()` to manage multiple sinks. Avoid calling `rr.spawn()`, `rr.save()`, or `rr.connect_grpc()` individually if multiple outputs are required.","message":"The Rerun SDK provides multiple operating modes (`spawn`, `connect_grpc`, `serve_grpc`, `save`, `stdout`). By default, these modes will override each other. If you intend to use multiple data sinks concurrently (e.g., streaming to a viewer and saving to a file simultaneously), you must explicitly configure them using `rr.set_sinks()`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}