Macro components for ParaView
Project description
ParaView Trame Components
This project gather helper classes that can be used with ParaView to create quickly and simply web solution for interacting with your data.
Usage example
The ./examples/
directory gather simple Python scripts using ParaView and exposing them as standalone trame applications.
Virtual Environment setup
Since ParaView does not come with trame, you need to create a virtual environment that brings all the missing dependency for paraview to use.
# Create and activate venv
python3.10 -m venv .venv
source .venv/bin/activate
# Install published package
pip install ptc
# Let ParaView know about the location of that venv
export PV_VENV=$PWD/.venv
Running examples
# Adjust path to point to your executable
export PVPYTHON=/Applications/ParaView-5.12.0.app/Contents/bin/pvpython
# Run the scripts
$PVPYTHON --force-offscreen-rendering ./examples/cone.py
$PVPYTHON --force-offscreen-rendering ./examples/cone_width_slider.py
$PVPYTHON --force-offscreen-rendering ./examples/wavelet-contour-state.py
Scripts structure
Each script add import paraview.web.venv
at the top to enable your virtual environment via the PV_VENV
environment variable.
Then we use the ptc (ParaView Trame Components) package to quickly create a trame application to view the data.
The wavelet-contour-state.py
script was created by ParaView when saving its state as a Python file. Then we added few lines at the end to create an interactive web viewer.
Check code
pre-commit run --all-files
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
Built Distribution
Hashes for paraview_trame_components-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86104efa8b07504d362941d375abf4f1c89dcfe64ff95ded87df486abc885258 |
|
MD5 | 377adfd1f24ee085d45eac22f3eb46d4 |
|
BLAKE2b-256 | cf0d417c369e336fddbfaf558dafddbaa2e4e22e4938e57d8655188bc69ec988 |
Hashes for paraview_trame_components-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ba32ff435ba1a64422e19d1cf8ab7f8ee9ccbbf39c4c22b579c7a2c0ad51943 |
|
MD5 | f797c089ec94f3b3d44deddc4741148a |
|
BLAKE2b-256 | 8a85198a1b8cb8ed91836b1efe3bf3a6fc7e4d283e9b3e55b6329150ca9cfe05 |