Skip to main content

Streamlit component that allows you to show PyVista 3d visualizations

Project description

stpyvista

Streamlit component that allows you to show PyVista 3d visualizations

Installation instructions

pip install stpyvista

Usage instructions

import pyvista as pv
import streamlit as st
from stpyvista import stpyvista, HTML_stpyvista

plotter = pv.Plotter()

# Store the 3D visualization in a sessions state variable
# to avoid re-rendering each time streamlit reruns the script

if "model" not in st.session.state:
    plotter = pv.Plotter()
    st.session.state.model = HTML_stpyvista(plotter)

stpyvista(st.session.state.model)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stpyvista-0.0.3.tar.gz (288.5 kB view hashes)

Uploaded Source

Built Distribution

stpyvista-0.0.3-py3-none-any.whl (289.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page