Python bindings and notebook widget support for ruviz
Project description
ruviz for Python
ruviz for Python wraps the Rust plotting runtime with a fluent Python API,
static export helpers, native desktop show(), and notebook widget support.
Install
pip install ruviz
If you want pandas or Polars dataframe inputs, install the optional dataframe extras:
pip install "ruviz[dataframes]"
Quick Start
import numpy as np
import ruviz
x = np.linspace(0.0, 4.0, 50)
y = x**2
(
ruviz.plot()
.line(x, y)
.title("Quadratic")
.xlabel("x")
.ylabel("y = x^2")
.save("quadratic.png")
)
Notebook and Desktop Usage
- In Jupyter,
plot.show()displays a static PNG in the cell output. - Use
plot.widget()when you want the synced WASM-backed notebook widget. plot.size_px(width, height)also controls the widget's displayed size and aspect ratio.- Without
size_px(...), the widget uses the default PNG size (640x480) and shrinks proportionally if the notebook column is narrower. - Drag the widget's bottom-right handle to resize the display freely.
- Hold
ShiftorCtrlwhile dragging the handle to preserve the current aspect ratio. - In the widget, right click opens the export menu and right drag performs box zoom.
- Outside notebooks,
plot.show()opens the native interactive window. - The published Linux wheel focuses on static rendering and notebook widgets. Install from source on Linux if you need the native desktop
plot.show()window. plot.render_png()andplot.render_svg()return in-memory export data.
Reactive Notebook Data
Use ruviz.observable(...) for notebook-driven updates that keep widget state
in sync:
import numpy as np
import ruviz
x = np.linspace(0.0, 6.0, 200)
y = ruviz.observable(np.sin(x))
plot = ruviz.plot().line(x, y).title("Live Sine Wave")
widget = plot.widget()
ObservableSeries supports elementwise arithmetic and NumPy ufuncs. Derived
observables stay live until you write to them directly:
from copy import deepcopy
import numpy as np
scaled = np.sin(y * 2.0 + 0.25)
template = deepcopy(plot)
deepcopy(plot) creates an independent live copy with fresh observables, while
plot.clone() remains a static snapshot copy.
Documentation
- Python docs source:
python/docs/ - Python examples:
python/examples/ - Root project README: https://github.com/Ameyanagi/ruviz/blob/main/README.md
Contributor Workflow
cd python
uv sync
uv run maturin develop
uv run python scripts/generate_gallery.py
uv run mkdocs serve
Rebuild the bundled widget frontend from the repository root when you change
the web SDK or packages/ruviz-web/src/python-widget.ts:
bun run build:python-widget
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 Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ruviz-0.4.6.tar.gz.
File metadata
- Download URL: ruviz-0.4.6.tar.gz
- Upload date:
- Size: 4.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef94a6468cca0e23c5aebd5559e8ba9a23cdcf62150812d932ec0f63e1fa8a45
|
|
| MD5 |
e362fd8cb1c886a6c96d9cfd09b1f897
|
|
| BLAKE2b-256 |
654324e287b36d85ea7192ff8a854609295bb6b6e1ed1fb6c0f4a5a2e941eebc
|
Provenance
The following attestation bundles were made for ruviz-0.4.6.tar.gz:
Publisher:
release.yml on Ameyanagi/ruviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ruviz-0.4.6.tar.gz -
Subject digest:
ef94a6468cca0e23c5aebd5559e8ba9a23cdcf62150812d932ec0f63e1fa8a45 - Sigstore transparency entry: 1253578372
- Sigstore integration time:
-
Permalink:
Ameyanagi/ruviz@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ruviz-0.4.6-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: ruviz-0.4.6-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aeb3d0204f4608915a4244a5de50038e67bee16b98075c9f74a5ac5e060f16b
|
|
| MD5 |
5e42f054ef57ec7a28fa26ad87cac815
|
|
| BLAKE2b-256 |
5ee0ddbc6e293801479fc34846cdb848c5a7ea883f3924555bbb262742c3a1ef
|
Provenance
The following attestation bundles were made for ruviz-0.4.6-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on Ameyanagi/ruviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ruviz-0.4.6-cp310-abi3-win_amd64.whl -
Subject digest:
8aeb3d0204f4608915a4244a5de50038e67bee16b98075c9f74a5ac5e060f16b - Sigstore transparency entry: 1253578576
- Sigstore integration time:
-
Permalink:
Ameyanagi/ruviz@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ruviz-0.4.6-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: ruviz-0.4.6-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a48e2759825c02140017479d570ba9f3505190bfdcd1ca5f5778a5173de2f88
|
|
| MD5 |
fcfa1841e68bfad3a3ebfb3b953bfa7e
|
|
| BLAKE2b-256 |
93070ec67ee3b20b084ca6a0019b3410160ae756d507219fd7788a647094d6b5
|
Provenance
The following attestation bundles were made for ruviz-0.4.6-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on Ameyanagi/ruviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ruviz-0.4.6-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
5a48e2759825c02140017479d570ba9f3505190bfdcd1ca5f5778a5173de2f88 - Sigstore transparency entry: 1253578415
- Sigstore integration time:
-
Permalink:
Ameyanagi/ruviz@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ruviz-0.4.6-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ruviz-0.4.6-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1025dcfecd72c4db1f6687026e9dfe3f053dbf56f03f3e3bb51eb28f7f130b0c
|
|
| MD5 |
b8eec849b719192288741ca4f20123fa
|
|
| BLAKE2b-256 |
0090d5971416e127f84e240327700c8c128abf4439cce88078d6236a47133709
|
Provenance
The following attestation bundles were made for ruviz-0.4.6-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on Ameyanagi/ruviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ruviz-0.4.6-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
1025dcfecd72c4db1f6687026e9dfe3f053dbf56f03f3e3bb51eb28f7f130b0c - Sigstore transparency entry: 1253578473
- Sigstore integration time:
-
Permalink:
Ameyanagi/ruviz@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ruviz-0.4.6-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: ruviz-0.4.6-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb868f98666e9066c277eed6cdbe4ab78d9053edd479894824cabe1597486fd5
|
|
| MD5 |
8d6c9e9ef055e368483261fed5899a53
|
|
| BLAKE2b-256 |
3545c10641d98578489de41ea679e75b8e7fca5772db4dbcd61e562295caf21d
|
Provenance
The following attestation bundles were made for ruviz-0.4.6-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on Ameyanagi/ruviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ruviz-0.4.6-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
eb868f98666e9066c277eed6cdbe4ab78d9053edd479894824cabe1597486fd5 - Sigstore transparency entry: 1253578525
- Sigstore integration time:
-
Permalink:
Ameyanagi/ruviz@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c22aa2a94e3eebd3a5457634a1a6c960eda83f3 -
Trigger Event:
push
-
Statement type: