Metadata-Version: 2.1
Name: stpyvista
Version: 0.0.2
Summary: Streamlit component that allows you to show PyVista 3d visualizations
Author: Edwin S
Author-email: Edwin S <esaavedrac@u.northwestern.edu>
Project-URL: Homepage, https://github.com/edsaac/streamlit-PyVista-viewer
Project-URL: Bug Tracker, https://github.com/edsaac/streamlit-PyVista-viewer/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# stpyvista

Streamlit component that allows you to show PyVista 3d visualizations

## Installation instructions 

```sh
pip install stpyvista
```

## Usage instructions

```python
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)
```
