trame-pyvista 0.1.7


pip install trame-pyvista

  Latest version

Released: Aug 14, 2026


Meta
Author: The PyVista Developers
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Science/Research

Operating System
  • MacOS
  • POSIX :: Linux
  • Microsoft :: Windows

Programming Language
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Scientific/Engineering :: Visualization

trame-pyvista

Trame interface for PyVista. Provides web-based 3D viewers, Jupyter backends, scene exporters, and a Sphinx directive for embedding interactive plots in docs.

This package was extracted from the pyvista.trame subpackage so the trame stack can release on its own cadence. PyVista discovers installed functionality through entry points, so existing user code keeps working once trame-pyvista is installed.

Install

pip install trame-pyvista

For Jupyter:

pip install "trame-pyvista[jupyter]"

What you get

  • Jupyter backends: trame, server, client, html. Registered with PyVista via the pyvista.jupyter_backends entry-point group, so pv.set_jupyter_backend('trame') works once trame-pyvista is installed.

  • Plotter views: PyVistaLocalView, PyVistaRemoteView, PyVistaRemoteLocalView for embedding in trame apps.

  • plotter.trame namespace: registered as a PyVista plotter component so exporters live under the trame namespace:

    import pyvista as pv
    
    pl = pv.Plotter()
    pl.add_mesh(pv.Sphere())
    pl.trame.export_vtksz('scene.vtksz')
    pl.trame.export_html('scene.html')
    
  • Sphinx directive: trame_pyvista.sphinx_ext provides the offlineviewer directive used by PyVista docs to embed exported .vtksz scenes. Add to conf.py:

    extensions = ['trame_pyvista.sphinx_ext']
    

Usage

import pyvista as pv

pv.set_jupyter_backend('trame')
pl = pv.Plotter()
pl.add_mesh(pv.Wavelet())
pl.show()

Custom UI:

from trame_pyvista import plotter_ui

ui = plotter_ui(plotter, mode='trame')

See examples/ for runnable scripts covering local/remote views, custom UIs, and toolbar customization.

Development

Uses uv and just:

just sync         # create venv and install dev deps
just test         # unit tests
just test-playwright  # Sphinx + browser integration tests
just lint         # pre-commit (ruff, etc.)
just typecheck
just build

License

MIT. See LICENSE.

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
packaging
pyvista (>=0.48)
trame (<3.13.3,>=2.5.2)
trame-client (<3.13.3,>=2.12.7)
trame-common (<1.2.5)
trame-server (!=3.7.*,!=3.8.0,<3.12.6,>=2.11.7)
trame-vtk (!=2.10.3,!=2.11.0,!=2.11.1,!=2.11.10,!=2.11.11,!=2.11.12,!=2.11.13,!=2.11.14,!=2.11.2,!=2.11.3,!=2.11.4,!=2.11.5,!=2.11.6,!=2.11.9,<2.11.17,>=2.5.8)
trame-vuetify (!=3.2.3,!=3.2.4,<3.2.6,>=2.3.1)