Registry / data / ipydatawidgets

ipydatawidgets

JSON →
library4.3.5pypypi✓ verified 84d ago

ipydatawidgets is a Python library that provides a set of interactive HTML widgets for Jupyter notebooks, designed to facilitate the reuse and efficient transmission of large datasets. Its primary purpose is to offer a standardized way to move array data between the Python kernel and the frontend, enabling multiple widgets to share the same data with a single network synchronization. The current version is 4.3.5, with an infrequent release cadence, the last PyPI release being in June 2023.

pip install ipydatawidgets
INSTALL
IMPORT
SIG · IPYDATAWIDGETS
I
ipydatawidgets
datapythonv4.3.5
Install
7.1s avg
Import
2104ms
Disk
152MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.3.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 2.192s · 158MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.1s · import 2.016s · 154MB
152MB installed
● package 152MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NDArrayWidget
from ipydatawidgets import NDArrayWidget
The primary widget for array data transfer.
DataUnion
from ipydatawidgets import DataUnion
A trait type that accepts both NumPy arrays directly or a reference to an NDArrayWidget.

This example demonstrates how to create and use the core `NDArrayWidget` to encapsulate NumPy array data. This widget can then be linked to other ipywidgets-based components that are designed to consume `NDArrayWidget` instances or `DataUnion` types.

import numpy as np from ipydatawidgets import NDArrayWidget # Create some raw NumPy data raw_data = np.random.rand(10, 10, 3).astype(np.float32) # Wrap the raw data in an NDArrayWidget data_widget = NDArrayWidget(raw_data) # The data_widget can now be passed to other widgets that accept NDArrayWidget instances # For demonstration, we'll just display it (though NDArrayWidget itself doesn't have a complex visual representation out of the box) data_widget
Debug
Known issues
gotchaWhen using JupyterLab 1 or 2, you may need to manually install the JupyterLab extension. Modern JupyterLab 3.x+ usually auto-configures `ipywidgets` support.
fix
Run `jupyter labextension install @jupyter-widgets/jupyterlab-manager` in your environment after installing `ipydatawidgets`. For JupyterLab 3.x+, ensure `jupyterlab_widgets` is installed and up to date.
affects: <4.0 (for older JupyterLab)
breakingipydatawidgets requires `ipywidgets` version >=7.6.0 and <9. Using `ipywidgets` v9 or higher may lead to compatibility issues or 'Error displaying widget' messages, as underlying APIs might have changed.
fix
Ensure your `ipywidgets` installation is within the compatible range: `pip install 'ipywidgets>=7.6.0,<9'`.
affects: All versions with `ipywidgets` >=9
gotchaFor developers creating custom widget libraries that integrate `ipydatawidgets`, be aware of breaking changes in `ipywidgets` itself (e.g., between v6, v7, and v8). These often involve updates to `_view_module_version`, `_model_module_version`, and `webpack` configurations.
fix
Consult the `ipywidgets` migration guides for custom widget authors, specifically for migrating from 6.x to 7.x, and from 7.x to 8.x. Update module versions and webpack configurations accordingly.
affects: Developers building custom widgets that depend on ipywidgets API
Errors
Common errors & fixes
Error displaying widget
This common error typically indicates that the Jupyter frontend (Notebook or Lab) cannot load or render the widget's JavaScript component. This is often due to missing or incompatible `ipywidgets` extensions, or conflicting Python/JavaScript widget versions.
fix
Ensure `ipywidgets` is correctly installed and compatible with your Jupyter environment. For JupyterLab, try `pip install jupyterlab_widgets` and potentially `jupyter labextension disable @jupyter-widgets/jupyterlab-manager && jupyter labextension enable @jupyter-widgets/jupyterlab-manager`. For classic Notebook, ensure `widgetsnbextension` is enabled. Check your `ipywidgets` version against `ipydatawidgets` requirements.
ImportError: DLL load failed: The specified procedure could not be found.
This error, often seen on Windows within Anaconda environments, typically points to conflicts between different Python installations or environment issues affecting underlying libraries like `tornado` or `ssl` that `notebook` (and thus `ipywidgets`) depends on.
fix
Verify that you are using a consistent Python environment (e.g., solely Anaconda's Python). Sometimes, reinstalling `ipywidgets`, `notebook`, or even your Anaconda environment can resolve deep-seated DLL conflicts. `conda update --all` or creating a fresh environment is often recommended.
Model class 'JupyterComm...' not found in registry (or similar 'Model class ... not found')
This specific error often arises when there's an incompatibility between the versions of `ipywidgets` (especially v8) and `jupyterlab-widgets` (especially v3) or when a custom widget's frontend model isn't properly registered or is incompatible with the manager.
fix
Ensure `ipywidgets` and `jupyterlab_widgets` (or `widgetsnbextension` for classic Notebook) are compatible. For `ipydatawidgets`, stick to `ipywidgets <9`. If you are developing a custom widget, verify your `_model_name`, `_view_name`, `_model_module`, `_view_module`, and their respective `_module_version` traits are correctly defined and match the expected `ipywidgets` API.
Upgrade
Version history
4.3.5latest on PyPI · released Jun 14, 2023
Audit
Dependencies
ipywidgetsrequiredCore dependency for interactive Jupyter widgets functionality. Requires version >=7.6.0,<9.
numpyrequiredRequired for handling numerical array data, particularly with the NDArrayWidget.
Agent activity
6 hits · last 30 days
node
6
Resources
ipydatawidgets — pip install ipydatawidgets · libregistry