Registry / data / ipydagred3

ipydagred3

JSON →
library0.4.1pypypi✓ verified 84d ago

ipydagred3 is an ipywidgets library designed for drawing and interacting with directed acyclic graphs (DAGs) directly within JupyterLab environments using the dagre-d3 JavaScript library. It enables dynamic creation and modification of graph structures from Python, including control over node/edge styles, tooltips, and click event handling. The library is currently in a 'Beta' development status (version 0.4.1) and provides interactive features for data pipeline visualization and similar applications.

pip install ipydagred3
INSTALL
IMPORT
SIG · IPYDAGRED3
I
ipydagred3
datapythonv0.4.1
Install
7.7s avg
Import
1824ms
Disk
121MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.1 · 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.920 runs
installs and imports cleanly · install 0.0s · import 1.909s · 134.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 7.7s · import 1.738s · 118MB
121MB installed
● package 121MB
Code
Verified usage

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

Graph
from ipydagred3 import Graph

This quickstart demonstrates how to create a simple directed graph with nodes and edges, customize their appearance, and display it within a Jupyter Notebook or JupyterLab environment. The `display()` function from `IPython.display` is used to render the widget.

from ipydagred3 import Graph from IPython.display import display # Create a new graph g = Graph() # Add nodes g.add_node("A", label="Start Node") g.add_node("B", label="Process B", shape='rect') g.add_node("C", label="End Node") # Add edges g.add_edge("A", "B", label="step 1") g.add_edge("B", "C", label="step 2", style='stroke-dasharray: 5, 5;') # Display the graph in a Jupyter environment display(g)
Debug
Known issues
gotchaWidgets not rendering in JupyterLab/Notebook due to incorrect extension setup or version mismatches.
fix
Ensure `ipywidgets` and `jupyterlab_widgets` (for JupyterLab) or `widgetsnbextension` (for classic Notebook) are correctly installed and enabled in your environment. Check the `ipywidgets` installation documentation for your specific Jupyter version. A common fix is `jupyter labextension install @jupyter-widgets/jupyterlab-manager` for JupyterLab 3.x and earlier, or ensuring `ipywidgets` is installed in both the kernel and JupyterLab environments if they are separate.
affects: All versions of ipydagred3, as it relies on ipywidgets and Jupyter frontend extensions.
gotchaPerformance degradation when visualizing very large or complex graphs.
fix
While `ipydagred3` is built for dynamic graphs, rendering extremely large datasets might be slow due to the underlying JavaScript rendering engine and data transfer. Consider simplifying the graph, using filtering, or exploring alternative server-side rendering solutions for extremely large graphs. This is a common limitation for browser-based widget libraries.
affects: All versions
breakingBreaking changes in the underlying `ipywidgets` library might affect `ipydagred3`'s functionality or require updates.
fix
Refer to the `ipywidgets` migration guides (e.g., from 7.x to 8.0) and ensure your `ipywidgets` installation is compatible with the `ipydagred3` version. Widget authors (including `ipydagred3`) often need to update their code to support new `ipywidgets` versions.
affects: Potentially any version, especially when migrating across major `ipywidgets` versions (e.g., 7.x to 8.x).
gotchaIncompatibility with Python versions older than 3.8 or newer Jupyter environments that drop support for older Python versions.
fix
Ensure your Python environment is version 3.8 or newer. Be aware that some newer Jupyter Notebook/Lab releases may drop support for older Python versions (e.g., Jupyter Notebook 7.x dropped Python 3.8 support). Align your Python and Jupyter versions for optimal compatibility.
affects: All versions requiring Python >=3.8.
Errors
Common errors & fixes
Error displaying widget: model not found
This error typically occurs when the necessary JupyterLab or Jupyter Notebook extensions for ipywidgets are not correctly installed or enabled, leading the frontend to fail at rendering the Python widget model.
fix
Ensure `ipywidgets` and the corresponding JupyterLab/Notebook extensions are properly installed and enabled by running: `pip install ipywidgets` and `jupyter labextension install @jupyter-widgets/jupyterlab-manager` (for JupyterLab 3.x and earlier) or ensuring `widgetsnbextension` is enabled for classic Notebook. A restart of JupyterLab/Notebook may also be required.
ipydagred3 not rendering in JupyterLab
Widgets from `ipydagred3` (an `ipywidgets` library) may not render in JupyterLab or Jupyter Notebook due to an incorrect setup of the required JavaScript extensions or version mismatches between `ipywidgets` and your Jupyter environment.
fix
Verify that `ipywidgets` and the `jupyterlab_widgets` (for JupyterLab) or `widgetsnbextension` (for classic Notebook) are installed and enabled. For JupyterLab, try `jupyter labextension install @jupyter-widgets/jupyterlab-manager`. Ensure compatible Python and `ipywidgets` versions (Python 3.8+ is recommended). A full restart of the Jupyter server can often resolve these issues.
ModuleNotFoundError: No module named 'ipydagred3'
This error indicates that the `ipydagred3` Python package has not been installed in the Python environment currently being used by your Jupyter kernel.
fix
Install the library using pip: `pip install ipydagred3`. If you are using a specific Python environment (e.g., a conda environment or virtual environment), ensure you install it within that active environment.
from ipydagred3 import display
The `ipydagred3` library does not expose a `display` function directly. The standard way to display `ipywidgets` (including `ipydagred3` graphs) in a Jupyter environment is by using the `display` function from `IPython.display`.
fix
Import `display` from `IPython.display` instead: `from IPython.display import display`.
Upgrade
Version history
0.4.1latest on PyPI · released Oct 31, 2023
Audit
Dependencies
ipywidgetsrequiredCore dependency for creating interactive Jupyter widgets, which ipydagred3 wraps.
daggrerequiredA convenience layer on top of dagre-d3-es, used by ipydagred3 for graph rendering.
pythonrequiredMinimum required Python version for the library.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources