https://github.com/tiwater/rerun-query
Query and extract entity data from Rerun data files.
https://github.com/tiwater/rerun-query
apache-arrow pyo3 rerun
Last synced: 10 months ago
JSON representation
Query and extract entity data from Rerun data files.
- Host: GitHub
- URL: https://github.com/tiwater/rerun-query
- Owner: tiwater
- License: apache-2.0
- Created: 2024-08-20T12:08:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-31T17:20:38.000Z (11 months ago)
- Last Synced: 2025-04-03T05:34:20.834Z (10 months ago)
- Topics: apache-arrow, pyo3, rerun
- Language: Rust
- Homepage: https://pypi.org/project/rerun-query
- Size: 7.91 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Rerun Query
[](https://pypi.org/project/rerun-query/)
[](https://pepy.tech/project/rerun-query)
[](https://github.com/tiwater/rerun-query/blob/main/LICENSE)
[](https://pypi.org/project/rerun-query)
Python SDK to query and extract data from [Rerun](https://rerun.io) files.
## Rerun Compatibility
This project is only compatible with Rerun 0.18. Please make sure the source rrd file is created with this version of Rerun SDK [[Rust](https://docs.rs/rerun/latest/rerun/)].
> [!NOTE]
> The Blueprint of Rerun data (controls the layout of the viewer) is ignored for now, while the entity_paths were still included in the return value of `list_entity_paths()`.
>
> Please [open an issue](https://github.com/tiwater/rerun-query/issues/new) if you need this feature or other help.
## Install
This project depends on `numpy`, so please make sure install it with this package together.
```bash
pip install numpy rerun-query
```
The retrieved data is in numpy arrays.
## Usage
Use this package:
```py
import requery
data = requery.query_data_entities(file_path, "", "")
for data_row in data:
print(f"Entity Path: {data_row.entity_path}")
for timeline_key, times in data_row.timelines.items():
print(f"Timeline({timeline_key}) - {times}")
data_object = data_row.data
for index, data in enumerate(data_object[:10]):
print(f"- {index + 1} {data}")
```
## Example
You can find running example and sample data file in [examples](https://github.com/tiwater/rerun-query/tree/main/examples) folder.
To run the example Python code:
```bash
cd ./examples
python3 -m venv .venv
source .venv/bin/activate
python3 main.py
```
The output includes entity paths, meta data, and tensor data in numpy arrays.
To view the logs in detail, run the program as:
```bash
RUST_LOG=debug python3 main.py
```
If the program crashes unexpectedly, try to diagnose with:
```bash
RUST_BACKTRACE=1 python3 main.py
```