trame-gradio-component
A Gradio custom component that embeds an interactive PyVista plotter in any Gradio app.
Installation
Clone the repository, then install the package:
pip install gradio_pyvistaplotter/
Quick Start
The following minimal example renders an interactive 3D sphere:
import pyvista as pv
import gradio as gr
from gradio_pyvistaplotter import PyvistaPlotter
plotter = pv.Plotter()
plotter.add_mesh(pv.Sphere(), show_edges=True, color="gold")
with gr.Blocks() as demo:
gr.Markdown("Gradio app with a PyVista plotter")
viewer = PyvistaPlotter(value=plotter)
demo.launch()
A more complete example with a mesh loader is available in gradio_pyvistaplotter/demo/app.py.
Known Issues
Linux – Ctrl+C does not stop the application
When using PyvistaPlotter with the standard gr.Blocks.launch() method, the application cannot be interrupted from the terminal via Ctrl+C. As a workaround, this package provides a custom launch() function that wraps gr.Blocks.launch() with proper signal handling:
import pyvista as pv
import gradio as gr
from gradio_pyvistaplotter import PyvistaPlotter, launch
plotter = pv.Plotter()
plotter.add_mesh(pv.Sphere(), show_edges=True, color="gold")
with gr.Blocks() as demo:
gr.Markdown("Gradio app with a PyVista plotter")
viewer = PyvistaPlotter(value=plotter)
launch(demo) # custom launch with proper signal handling
Issues / TODO
- Currently, two files are written to the tmp directory on each render:
static_viewer.htmlandscene_<id>.vtksz. Investigate whether the HTML can be generated and passed as an in-memory string instead of a file on disk. -
static_viewer.htmlis currently bundled with this package — should it be imported directly fromtrameinstead?
Metadata
Release files for gradio-pyvistaplotter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gradio_pyvistaplotter-0.1.0.tar.gz | 322.3 kB | With provenance | Details for gradio_pyvistaplotter-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gradio_pyvistaplotter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for gradio_pyvistaplotter-0.1.0-py3-none-any.whl |
Total release size: 587.2 kB
Release files / gradio_pyvistaplotter-0.1.0.tar.gz
| Download URL | gradio_pyvistaplotter-0.1.0.tar.gz |
|---|---|
| Size | 322.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9afcda2330ce2125ecf28fc3dad9fac4463563c09aa67bf94ef5818f75eda30f
|
|
BLAKE2b-256 checksum How to use checksums |
4be7c05988bdc27ebf5e7c432c465a4f9d22ddf91bc621fc26cce5d649d3bb99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logRelease files / gradio_pyvistaplotter-0.1.0-py3-none-any.whl
| Download URL | gradio_pyvistaplotter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 264.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb9ba8c31e286f8bf40d4248a8cf842c3ddc50b447eb014dd5d76c4018e21ad4
|
|
BLAKE2b-256 checksum How to use checksums |
e46418b493a867749a1b01113b6913e83476c1fadd1622a72b8b1f1c8c5ec306
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logSecurity for gradio-pyvistaplotter 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gradio_pyvistaplotter-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.