PyNodeWidget
A Python wrapper for ReactFlow using AnyWidget - build interactive node graphs without JavaScript.
Quick Start
from pynodewidget import NodeFlowWidget
from pynodewidget.grid_layouts import create_three_column_grid
from pynodewidget.models import ButtonHandle, NumberField, LabeledHandle, TextField
widget = NodeFlowWidget()
grid_layout = create_three_column_grid(
left_components=[
LabeledHandle(id="input", handle_type="input")
],
center_components=[
NumberField(id="value", value=50, min=0, max=100),
TextField(id="name", value="Processor")
],
right_components=[
LabeledHandle(id="output", handle_type="output")
]
)
widget.add_node_type(
type_name="processor",
label="Processor",
icon="⚙️",
grid_layout=grid_layout
)
widget
Demo
Features
- Interactive Node Graphs: Build visual workflows with drag-and-drop nodes
- No JavaScript Required: Pure Python API for defining node types and layouts
- JSON Schema Integration: Automatically generate node UIs from JSON schemas
- Static HTML Export: Export workflows as standalone HTML files for documentation and sharing
- Interactive or view-only modes
- Self-contained files that work without Python/Jupyter
- Perfect for visualizing DAGs and data pipelines
- Jupyter & Marimo Support: Works seamlessly in Jupyter notebooks and Marimo apps
- Flexible Layouts: Customizable grid-based node layouts with various components
- Type-Safe: Built with Pydantic for robust type validation
Export Workflows
# Export as standalone HTML (no Python required to view)
widget.export_html("workflow.html", interactive=True)
# Export as JSON for persistence
widget.export_json("workflow.json")
Development
Requires:
- Python 3.12+ (uv)
- Bun for JavaScript bundling
# Install dependencies
uv venv
uv pip install -e .[all]
task
Documentation
# Serve documentation locally with live reload
task docs-serve
# Build static documentation
task docs-build
See full documentation at the project's GitHub Pages or run locally.
Release files for pynodewidget 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pynodewidget-0.2.3.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynodewidget-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 MB
Release files / pynodewidget-0.2.3.tar.gz
| Download URL | pynodewidget-0.2.3.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b7358ddbe51a61f0b9664adbb6b91e16aa8fe10b76e4a3d163edc8df24001f6
|
|
BLAKE2b-256 checksum How to use checksums |
8d45557c6dc5e76e0a37c61fb08f37c6cc9dbc9086e2776e8e2c60d7e57e60d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2025.
Transparency logRelease files / pynodewidget-0.2.3-py3-none-any.whl
| Download URL | pynodewidget-0.2.3-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91982352867258228be93e7dc0a46e7627f0799dc368b4c4ee4d266dc197b810
|
|
BLAKE2b-256 checksum How to use checksums |
205538260a5ed63067a41538734a075594eac7486d3abef9290d28233748bcf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2025.
Transparency log