Overview of @voila-dashboards/widgets-manager7
mainipywidgets version 7. It handles the synchronization and rendering of widgets within the Voilà ecosystem for environments using the ipywidgets 7 architecture.repository·main·Indexed 26 days ago
https://github.com/voila-dashboards/voilaVoilà turns Jupyter notebooks into standalone web applications, providing users with dedicated Jupyter kernels for interactive widgets and rich mime-type rendering. It includes support for JupyterLab previews, custom nbconvert templates, and dedicated widget managers for ipywidgets versions 7 and 8. The tool can be run as a standalone Tornado application or integrated as a server extension for notebook or jupyter_server.
ipywidgets version 7. It handles the synchronization and rendering of widgets within the Voilà ecosystem for environments using the ipywidgets 7 architecture.ipywidgets version 8. Use this package when your Voilà dashboards rely on the ipywidgets 8 ecosystem.jupyter-server 2, you can enable token authentication. By default, it is disabled. You can start Voilà with an auto-generated token or a specific personalized token using the --token flag.The JupyterLab extension is a prebuilt extension. To develop it, you must have the server extension enabled, then link your development version to JupyterLab and build it.
# install the package in development mode
python -m pip install -e .
# link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# build the lab extension
jlpm run build --scope @voila-dashboards/jupyterlab-preview
# or use watch mode to pick up changes automatically
jlpm run watch# install the package in development mode
python -m pip install -e .
# link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# build the lab extension
jlpm run build --scope @voila-dashboards/jupyterlab-preview
# or use watch mode to pick up changes automatically
jlpm run watchIf a notebook requires user-specific data from a URL query string, pre-rendering might fail. In preheating mode, you can use voila.utils.wait_for_request to pause execution until a user connects, allowing the notebook to capture the QUERY_STRING environment variable.
import os
from voila.utils import wait_for_request
# Pause execution until a user connects and request info is available
wait_for_request()
query_string = os.getenv('QUERY_STRING')To develop Voilà, create a conda environment with the necessary dependencies, clone your fork, install JS dependencies, and install Voilà in editable mode.
# create a new conda environment
conda create -n voila -c conda-forge notebook jupyterlab nodejs "yarn<4" pip
conda activate voila
# download voila from your GitHub fork
git clone https://github./<your-github-username>/voila.git
# install JS dependencies and build js assets
cd voila
yarn install
# install Voilà in editable mode
python -m pip install -e .# create a new conda environment
conda create -n voila -c conda-forge notebook jupyterlab nodejs "yarn<4" pip
conda activate voila
# download voila from your GitHub fork
git clone https://github./<your-github-username>/voila.git
# install JS dependencies and build js assets
cd voila
yarn install
# install Voilà in editable mode
python -m pip install -e .You can install Voilà from PyPI using pip.
pip install voilagridstack template for drag-and-drop cell layouts, use the --template flag.Ploomber Cloud offers a free deployment option for Voilà apps:
.ipynb file and requirements.txt file.Preheating reduces dashboard load times by maintaining a pool of standby kernels that have already executed the notebook.
Warning: This feature is incompatible with prelaunch-hook functionality.
To activate, set --preheat_kernel=True. You can specify the pool size with --pool_size. For advanced configuration (like per-notebook pool sizes or environment variables), use a voila.json file.
Themes can be applied without CLI flags using these methods:
?theme=<theme-name> to the URL (e.g., http://localhost:8867/voila/render/notebook.ipynb?theme=dark).metadata/voila/theme.Voilà can be integrated directly into a Jupyter server. To enable it, use the jupyter serverextension enable command for either the notebook or jupyter_server backend. Once enabled, the Voilà app is accessible via the base URL suffixed with /voila.
jupyter serverextension enable voila
# or
jupyter server extension enable voila