Metadata-Version: 2.4
Name: pynodewidget
Version: 0.1.0
Summary: A Python wrapper for ReactFlow using AnyWidget - build interactive node graphs without JavaScript
Project-URL: Homepage, https://henningscheufler.github.io/pynodewidget/
Project-URL: Issues, https://github.com/HenningScheufler/pynodewidget/issues
Author-email: Henning <henning.scheufler@web.de>
License-Expression: MIT
License-File: LICENSE
Keywords: graph,jupyter,nodes,reactflow,widget
Classifier: Framework :: Jupyter
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: anywidget>=0.9.0
Requires-Dist: pydantic>=2.12.4
Requires-Dist: traitlets>=5.14.0
Provides-Extra: all
Requires-Dist: hatchling>=1.27.0; extra == 'all'
Requires-Dist: jupyterlab>=4.5.0; extra == 'all'
Requires-Dist: marimo>=0.18.0; extra == 'all'
Requires-Dist: mkdocs-material>=9.5.0; extra == 'all'
Requires-Dist: mkdocs>=1.6.0; extra == 'all'
Requires-Dist: mkdocstrings[python]>=0.25.0; extra == 'all'
Requires-Dist: pymdown-extensions>=10.8.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
Requires-Dist: pytest>=7.0.0; extra == 'all'
Requires-Dist: taskipy>=1.13.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: hatchling>=1.27.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: taskipy>=1.13.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.6.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25.0; extra == 'docs'
Requires-Dist: pymdown-extensions>=10.8.0; extra == 'docs'
Provides-Extra: notebooks
Requires-Dist: jupyterlab>=4.5.0; extra == 'notebooks'
Requires-Dist: marimo>=0.18.0; extra == 'notebooks'
Description-Content-Type: text/markdown

# PyNodeWidget

A Python wrapper for ReactFlow using AnyWidget - build interactive node graphs without JavaScript.

## Quick Start

```python
from pynodewidget import NodeFlowWidget

# Create a simple flow
widget = NodeFlowWidget()
widget.nodes = [
    {"id": "1", "position": {"x": 0, "y": 0}, "data": {"label": "Node 1"}},
    {"id": "2", "position": {"x": 0, "y": 100}, "data": {"label": "Node 2"}},
]
widget.edges = [
    {"id": "e1-2", "source": "1", "target": "2"},
]

# Display in Jupyter
widget
```

## Development

Requires:
- Python 3.12+
- [Bun](https://bun.sh) for JavaScript bundling

```bash
# Install dependencies
uv sync
uv pip install -e ".[dev,docs]"

# Build JavaScript assets
cd js && bun install && bun run build

# Build Python package (automatically builds JS)
uv build
```

### Documentation

```bash
# Serve documentation locally with live reload
task docs-serve

# Build static documentation
task docs-build

# Deploy to GitHub Pages
task docs-deploy
```

See full documentation at the project's GitHub Pages or run locally.

## Project Structure

- `src/pynodewidget/` - Python package
- `js/` - ReactFlow TypeScript/React code
- `js/dist/` - Built JavaScript bundle
- `src/pynodewidget/static/` - Bundled assets included in package
