==============
trame-vtklocal
==============
VTK Local Rendering using VTK/WASM to match server side rendering pipeline on the client side.
The current code base is still at its infancy but we aim to make it the default implementation for local rendering using VTK/ParaView with trame.
License
----------------------------------------
This library is OpenSource and follow the Apache Software License
Installation
----------------------------------------
.. code-block:: console
pip install trame-vtklocal
# We need a VTK that has its wasm counterpart
# This is the first version available with it
# For ParaView (not yet supported), VTK don't need to be installed
pip install "vtk==9.4.0rc2" --extra-index-url https://wheels.vtk.org
Development
----------------------------------------
Build and install the Vue components
.. code-block:: console
cd vue-components
npm i
npm run build
cd -
Install the library
.. code-block:: console
pip install -e .
Optionally, you can develop with bleeding edge VTK by following these steps. Make sure you've these tools
1. git
2. CMake
3. Ninja
4. Python
5. NodeJS >= 22.0.0: https://nodejs.org/en/download/package-manager
6. Emscripten SDK: See https://emscripten.org/docs/getting_started/downloads.html#download-and-install
.. code-block:: console
# Compile VTK for wasm32 architecture using emscripten. Build artifacts can be found in dev/vtk/build/wasm
./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t wasm32 -p RelWithDebInfo
# Compile VTK with python wrappings using system C++ compiler. Build artifacts can be found in dev/vtk/build/py
./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t py -p RelWithDebInfo
# Set environment variables
source ./utils/dev_environment.sh -b master -p RelWithDebInfo
Running examples
----------------------------------------
.. code-block:: console
pip install trame trame-vtklocal trame-vuetify trame-vtk
# We need a VTK that has its wasm counterpart
# This is the first version available with it
# For ParaView (not yet supported), VTK don't need to be installed
pip install "vtk==9.3.20240810.dev0" --extra-index-url https://wheels.vtk.org
# regular trame app
python ./examples/vtk/cone.py
Some example are meant to test and validate WASM rendering.
Some will default for remote rendering but if you want to force them to use WASM just run `export USE_WASM=1` before executing them.
SharedArrayBuffer
----------------------------------------
To enable SharedArrayBuffer within trame you can just set the following on the server
.. code-block:: console
server.http_headers.shared_array_buffer = True
This will download the threaded WASM version. Otherwise, the non-threaded version will be used as it does not require SharedArrayBuffer.
Raw data
{
"_id": null,
"home_page": null,
"name": "trame-vtklocal",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Python, Interactive, Web, Application, Framework",
"author": "Kitware Inc.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2e/62/857be33a4da6ae2c62397c9471bc42f3aeb287b3d0d9dc442a984350480c/trame-vtklocal-0.6.5.tar.gz",
"platform": null,
"description": "==============\ntrame-vtklocal\n==============\n\nVTK Local Rendering using VTK/WASM to match server side rendering pipeline on the client side.\nThe current code base is still at its infancy but we aim to make it the default implementation for local rendering using VTK/ParaView with trame.\n\nLicense\n----------------------------------------\n\nThis library is OpenSource and follow the Apache Software License\n\nInstallation\n----------------------------------------\n\n.. code-block:: console\n\n pip install trame-vtklocal \n\n # We need a VTK that has its wasm counterpart\n # This is the first version available with it\n # For ParaView (not yet supported), VTK don't need to be installed\n pip install \"vtk==9.4.0rc2\" --extra-index-url https://wheels.vtk.org\n\n\nDevelopment\n----------------------------------------\n\nBuild and install the Vue components\n\n.. code-block:: console\n\n cd vue-components\n npm i\n npm run build\n cd -\n\nInstall the library\n\n.. code-block:: console\n\n pip install -e .\n\nOptionally, you can develop with bleeding edge VTK by following these steps. Make sure you've these tools\n1. git\n2. CMake\n3. Ninja\n4. Python\n5. NodeJS >= 22.0.0: https://nodejs.org/en/download/package-manager\n6. Emscripten SDK: See https://emscripten.org/docs/getting_started/downloads.html#download-and-install\n\n.. code-block:: console\n\n # Compile VTK for wasm32 architecture using emscripten. Build artifacts can be found in dev/vtk/build/wasm\n ./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t wasm32 -p RelWithDebInfo\n\n # Compile VTK with python wrappings using system C++ compiler. Build artifacts can be found in dev/vtk/build/py\n ./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t py -p RelWithDebInfo\n\n # Set environment variables\n source ./utils/dev_environment.sh -b master -p RelWithDebInfo\n\nRunning examples\n----------------------------------------\n\n.. code-block:: console\n\n pip install trame trame-vtklocal trame-vuetify trame-vtk\n\n # We need a VTK that has its wasm counterpart\n # This is the first version available with it\n # For ParaView (not yet supported), VTK don't need to be installed\n pip install \"vtk==9.3.20240810.dev0\" --extra-index-url https://wheels.vtk.org\n\n # regular trame app\n python ./examples/vtk/cone.py \n\n\nSome example are meant to test and validate WASM rendering.\nSome will default for remote rendering but if you want to force them to use WASM just run `export USE_WASM=1` before executing them.\n\nSharedArrayBuffer\n----------------------------------------\n\nTo enable SharedArrayBuffer within trame you can just set the following on the server\n\n.. code-block:: console\n\n server.http_headers.shared_array_buffer = True\n\nThis will download the threaded WASM version. Otherwise, the non-threaded version will be used as it does not require SharedArrayBuffer.\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "VTK Local Rendering using WASM",
"version": "0.6.5",
"project_urls": null,
"split_keywords": [
"python",
" interactive",
" web",
" application",
" framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "70182a641dfedfa9b9aa14f39260555791e0025bb8e0ee673895105a8d8e2690",
"md5": "4e6cdefe0026132033b879a720b309f6",
"sha256": "b883827e1a76419af035429206c5e273f26a9f921191f4927dbedba513b9acfe"
},
"downloads": -1,
"filename": "trame_vtklocal-0.6.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e6cdefe0026132033b879a720b309f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14991,
"upload_time": "2024-11-16T23:11:03",
"upload_time_iso_8601": "2024-11-16T23:11:03.017005Z",
"url": "https://files.pythonhosted.org/packages/70/18/2a641dfedfa9b9aa14f39260555791e0025bb8e0ee673895105a8d8e2690/trame_vtklocal-0.6.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2e62857be33a4da6ae2c62397c9471bc42f3aeb287b3d0d9dc442a984350480c",
"md5": "23b3d754e2743a263ee5959b5dbfcab1",
"sha256": "33ecadb169929d2782b30d7e14987dd8be7605dec16b28947e30b6493a77aafe"
},
"downloads": -1,
"filename": "trame-vtklocal-0.6.5.tar.gz",
"has_sig": false,
"md5_digest": "23b3d754e2743a263ee5959b5dbfcab1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13519,
"upload_time": "2024-11-16T23:11:04",
"upload_time_iso_8601": "2024-11-16T23:11:04.608145Z",
"url": "https://files.pythonhosted.org/packages/2e/62/857be33a4da6ae2c62397c9471bc42f3aeb287b3d0d9dc442a984350480c/trame-vtklocal-0.6.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-16 23:11:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "trame-vtklocal"
}