rerun-sdk


Namererun-sdk JSON
Version 0.15.0 PyPI version JSON
download
home_pageNone
SummaryThe Rerun Logging SDK
upload_time2024-04-09 14:48:42
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.8
licenseMIT OR Apache-2.0
keywords computer-vision logging rerun
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # The Rerun Python Log SDK

Use the Rerun SDK to log data like images, tensors, point clouds, and text. Logs are streamed to the Rerun Viewer for live visualization or to file for later use.

<p align="center">
  <img width="800" alt="Rerun Viewer" src="https://github.com/rerun-io/rerun/assets/2624717/c4900538-fc3a-43b8-841a-8d226e7b5a2e">
</p>

## Install

```sh
pip3 install rerun-sdk
```

ℹ️ Note:
The Python module is called `rerun`, while the package published on PyPI is `rerun-sdk`.

## Example
```py
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
* [Examples](https://www.rerun.io/examples)
* [Python API docs](https://ref.rerun.io/docs/python)
* [Quick start](https://www.rerun.io/docs/getting-started/python)
* [Tutorial](https://www.rerun.io/docs/getting-started/logging-python)
* [Troubleshooting](https://www.rerun.io/docs/getting-started/troubleshooting)
* [Discord Server](https://discord.com/invite/Gcm8BbTaAj)

## 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:
```sh
python3 -m rerun
```

In a second terminal, run the example with the `--connect` option:
```sh
python3 python examples/python/plots/main.py --connect
```

-------------------------

# From source

Setup:

* Install the Rust toolchain: <https://rustup.rs/>
* `git clone git@github.com:rerun-io/rerun.git && cd rerun`
* Run `./scripts/setup_dev.sh`.
* Make sure `cargo --version` prints `1.74.0` once you are done

## Building
To build from source and install Rerun into your *current* Python environment run:

```sh
python3 -m pip install --upgrade pip
pip3 install -r rerun_py/requirements-build.txt
pip3 install "./rerun_py"
```

ℹ️ Note:
If you are unable to upgrade pip to version `>=21.3`, you need to pass `--use-feature=in-tree-build` to the `pip3 install` command.

## Development

To set up a new virtualenv for development:

```sh
just py-dev-env
# For bash/zsh users:
source venv/bin/activate
# Or if you're using fish:
source venv/bin/activate.fish
```

## Build, test, and run

For ease of development you can build and install in "editable" mode. This means you can edit the `rerun` Python code without having to re-build and install to see changes.

```sh
# Build the SDK and install in develop mode into the virtualenv
# Re-run this if the Rust code has changed!
source venv/bin/activate
just py-build
```

### Test
```sh
# Run the unit tests
just py-test

# Run the linting checks
just py-lint

# Run an example
python examples/python/minimal/main.py
```

## Building an installable Python Wheel
The Python bindings to the core Rust library are built using https://github.com/PyO3/pyo3.

To build an installable Python wheel run:
```
pip install -r rerun_py/requirements-build.txt
maturin build -m rerun_py/Cargo.toml --release
```

By default the wheels will be built to `target/wheels` (use the `-o` flag to set a different output directory).

Now you can install `rerun` in any Python3 environment using:

```sh
pip3 install target/wheels/*.whl
```

## Viewing the docs locally
The rerun python docs are generated using `mkdocs`

Install the doc requirements:
```
pip install -r rerun_py/requirements-doc.txt
```

Serve the docs:
```sh
mkdocs serve -f rerun_py/mkdocs.yml -w rerun_py
```
or
```sh
just py-docs-serve
```

For information on how the docs system works, see: [docs/writing_docs.md](docs/writing_docs.md)


## Troubleshooting
You can run with `RUST_LOG=debug` to get more output out of the rerun SDK.

If you are using an Apple-silicon Mac, make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it:

``` sh
rustup set default-host aarch64-apple-darwin && rustup install 1.74
```

If you want to switch back, this is how:
``` sh
rustup set default-host x86_64-apple-darwin && rustup install 1.74
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rerun-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.8",
    "maintainer_email": null,
    "keywords": "computer-vision, logging, rerun",
    "author": null,
    "author_email": "\"Rerun.io\" <opensource@rerun.io>",
    "download_url": null,
    "platform": null,
    "description": "# The Rerun Python Log SDK\n\nUse the Rerun SDK to log data like images, tensors, point clouds, and text. Logs are streamed to the Rerun Viewer for live visualization or to file for later use.\n\n<p align=\"center\">\n  <img width=\"800\" alt=\"Rerun Viewer\" src=\"https://github.com/rerun-io/rerun/assets/2624717/c4900538-fc3a-43b8-841a-8d226e7b5a2e\">\n</p>\n\n## Install\n\n```sh\npip3 install rerun-sdk\n```\n\n\u2139\ufe0f Note:\nThe Python module is called `rerun`, while the package published on PyPI is `rerun-sdk`.\n\n## Example\n```py\nimport rerun as rr\nimport numpy as np\n\nrr.init(\"rerun_example_app\", spawn=True)\n\npositions = np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-5, 5, 10j)]]]).T\ncolors = np.vstack([rgb.ravel() for rgb in np.mgrid[3 * [slice(0, 255, 10j)]]]).astype(np.uint8).T\n\nrr.log(\"points3d\", rr.Points3D(positions, colors=colors))\n```\n\n## Resources\n* [Examples](https://www.rerun.io/examples)\n* [Python API docs](https://ref.rerun.io/docs/python)\n* [Quick start](https://www.rerun.io/docs/getting-started/python)\n* [Tutorial](https://www.rerun.io/docs/getting-started/logging-python)\n* [Troubleshooting](https://www.rerun.io/docs/getting-started/troubleshooting)\n* [Discord Server](https://discord.com/invite/Gcm8BbTaAj)\n\n## Logging and viewing in different processes\n\nYou can run the viewer and logger in different processes.\n\nIn one terminal, start up a viewer with a server that the SDK can connect to:\n```sh\npython3 -m rerun\n```\n\nIn a second terminal, run the example with the `--connect` option:\n```sh\npython3 python examples/python/plots/main.py --connect\n```\n\n-------------------------\n\n# From source\n\nSetup:\n\n* Install the Rust toolchain: <https://rustup.rs/>\n* `git clone git@github.com:rerun-io/rerun.git && cd rerun`\n* Run `./scripts/setup_dev.sh`.\n* Make sure `cargo --version` prints `1.74.0` once you are done\n\n## Building\nTo build from source and install Rerun into your *current* Python environment run:\n\n```sh\npython3 -m pip install --upgrade pip\npip3 install -r rerun_py/requirements-build.txt\npip3 install \"./rerun_py\"\n```\n\n\u2139\ufe0f Note:\nIf you are unable to upgrade pip to version `>=21.3`, you need to pass `--use-feature=in-tree-build` to the `pip3 install` command.\n\n## Development\n\nTo set up a new virtualenv for development:\n\n```sh\njust py-dev-env\n# For bash/zsh users:\nsource venv/bin/activate\n# Or if you're using fish:\nsource venv/bin/activate.fish\n```\n\n## Build, test, and run\n\nFor ease of development you can build and install in \"editable\" mode. This means you can edit the `rerun` Python code without having to re-build and install to see changes.\n\n```sh\n# Build the SDK and install in develop mode into the virtualenv\n# Re-run this if the Rust code has changed!\nsource venv/bin/activate\njust py-build\n```\n\n### Test\n```sh\n# Run the unit tests\njust py-test\n\n# Run the linting checks\njust py-lint\n\n# Run an example\npython examples/python/minimal/main.py\n```\n\n## Building an installable Python Wheel\nThe Python bindings to the core Rust library are built using https://github.com/PyO3/pyo3.\n\nTo build an installable Python wheel run:\n```\npip install -r rerun_py/requirements-build.txt\nmaturin build -m rerun_py/Cargo.toml --release\n```\n\nBy default the wheels will be built to `target/wheels` (use the `-o` flag to set a different output directory).\n\nNow you can install `rerun` in any Python3 environment using:\n\n```sh\npip3 install target/wheels/*.whl\n```\n\n## Viewing the docs locally\nThe rerun python docs are generated using `mkdocs`\n\nInstall the doc requirements:\n```\npip install -r rerun_py/requirements-doc.txt\n```\n\nServe the docs:\n```sh\nmkdocs serve -f rerun_py/mkdocs.yml -w rerun_py\n```\nor\n```sh\njust py-docs-serve\n```\n\nFor information on how the docs system works, see: [docs/writing_docs.md](docs/writing_docs.md)\n\n\n## Troubleshooting\nYou can run with `RUST_LOG=debug` to get more output out of the rerun SDK.\n\nIf you are using an Apple-silicon Mac, make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it:\n\n``` sh\nrustup set default-host aarch64-apple-darwin && rustup install 1.74\n```\n\nIf you want to switch back, this is how:\n``` sh\nrustup set default-host x86_64-apple-darwin && rustup install 1.74\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT OR Apache-2.0",
    "summary": "The Rerun Logging SDK",
    "version": "0.15.0",
    "project_urls": {
        "documentation": "https://www.rerun.io/docs",
        "homepage": "https://www.rerun.io",
        "repository": "https://github.com/rerun-io/rerun"
    },
    "split_keywords": [
        "computer-vision",
        " logging",
        " rerun"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c8dd23413facc03895001f2260621ac7d394e317de0be9f130dffcd4ca1191d1",
                "md5": "84dc47842cb88858a3e81667d985e903",
                "sha256": "d323842918690b93f7137ad02fa257f843dfa1c6861707d9245f7d4b0c8a000b"
            },
            "downloads": -1,
            "filename": "rerun_sdk-0.15.0-cp38-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "84dc47842cb88858a3e81667d985e903",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<3.13,>=3.8",
            "size": 21700101,
            "upload_time": "2024-04-09T14:48:42",
            "upload_time_iso_8601": "2024-04-09T14:48:42.730558Z",
            "url": "https://files.pythonhosted.org/packages/c8/dd/23413facc03895001f2260621ac7d394e317de0be9f130dffcd4ca1191d1/rerun_sdk-0.15.0-cp38-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6295b3373600ef590184946825afa65e9aeda0d941c37b9a8ed0711e6c96e7c2",
                "md5": "4d38662309a60bb759bbe6c0b03f527f",
                "sha256": "fb2e9c13a2ccbb77dc059b2d0b8064c4335a65eae92e54b00aabffeaa5d1ee52"
            },
            "downloads": -1,
            "filename": "rerun_sdk-0.15.0-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "4d38662309a60bb759bbe6c0b03f527f",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<3.13,>=3.8",
            "size": 20852206,
            "upload_time": "2024-04-09T14:48:45",
            "upload_time_iso_8601": "2024-04-09T14:48:45.941144Z",
            "url": "https://files.pythonhosted.org/packages/62/95/b3373600ef590184946825afa65e9aeda0d941c37b9a8ed0711e6c96e7c2/rerun_sdk-0.15.0-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "305ae3d02f0147ad20aa3a34975d4137afac68b2ef4c52efc572a6b1958c25f6",
                "md5": "21e7376b7fce23e9bfdf74c0ba4f7ace",
                "sha256": "adfaae3e86e71c12dcdb2015e7706fec83fb24b24c4e15ba8464b4a355c8c304"
            },
            "downloads": -1,
            "filename": "rerun_sdk-0.15.0-cp38-abi3-manylinux_2_31_aarch64.whl",
            "has_sig": false,
            "md5_digest": "21e7376b7fce23e9bfdf74c0ba4f7ace",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<3.13,>=3.8",
            "size": 26776744,
            "upload_time": "2024-04-09T14:48:49",
            "upload_time_iso_8601": "2024-04-09T14:48:49.195112Z",
            "url": "https://files.pythonhosted.org/packages/30/5a/e3d02f0147ad20aa3a34975d4137afac68b2ef4c52efc572a6b1958c25f6/rerun_sdk-0.15.0-cp38-abi3-manylinux_2_31_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b3d7ac0b4cb81ac0c5d7fad3ff36b0ff5ca774e1e561822773359b62c6d7b7ac",
                "md5": "99f2ff0fed2266f3e5d8d00586dd5906",
                "sha256": "a344b0720194ec8462893b028677f580e9ee88881e693fdfe3e113ff33412601"
            },
            "downloads": -1,
            "filename": "rerun_sdk-0.15.0-cp38-abi3-manylinux_2_31_x86_64.whl",
            "has_sig": false,
            "md5_digest": "99f2ff0fed2266f3e5d8d00586dd5906",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<3.13,>=3.8",
            "size": 27180881,
            "upload_time": "2024-04-09T14:48:52",
            "upload_time_iso_8601": "2024-04-09T14:48:52.846005Z",
            "url": "https://files.pythonhosted.org/packages/b3/d7/ac0b4cb81ac0c5d7fad3ff36b0ff5ca774e1e561822773359b62c6d7b7ac/rerun_sdk-0.15.0-cp38-abi3-manylinux_2_31_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "af98abdcedf7fd12e28cc2454b87fc988b9d8031ba052ecec6e2dbcf019b1836",
                "md5": "8401bc343db584b975773b6ffd3d86c5",
                "sha256": "30e3ae4c5d2502ac5b48bd984334908d2dddbc9d3cd8ac9514388f3cec9abd02"
            },
            "downloads": -1,
            "filename": "rerun_sdk-0.15.0-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "8401bc343db584b975773b6ffd3d86c5",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "<3.13,>=3.8",
            "size": 19182906,
            "upload_time": "2024-04-09T14:48:56",
            "upload_time_iso_8601": "2024-04-09T14:48:56.204803Z",
            "url": "https://files.pythonhosted.org/packages/af/98/abdcedf7fd12e28cc2454b87fc988b9d8031ba052ecec6e2dbcf019b1836/rerun_sdk-0.15.0-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-09 14:48:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rerun-io",
    "github_project": "rerun",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rerun-sdk"
}
        
Elapsed time: 0.25799s