Skip to main content

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

Project description

PyNodeWidget

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

Quick Start

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 for JavaScript bundling
# 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

# 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynodewidget-0.1.0.tar.gz (630.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynodewidget-0.1.0-py3-none-any.whl (487.4 kB view details)

Uploaded Python 3

File details

Details for the file pynodewidget-0.1.0.tar.gz.

File metadata

  • Download URL: pynodewidget-0.1.0.tar.gz
  • Upload date:
  • Size: 630.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pynodewidget-0.1.0.tar.gz
Algorithm Hash digest
SHA256 358eb43e12b5b562a7cb3eda70b0ac7aecfbdbd6affe8bc6a3528cf5ef14ac6f
MD5 e80020e7407b1308af28413d9aa74e76
BLAKE2b-256 d89ba2c955c078386c09c52921048d8e91a9345a48c5e768b2f49c6ec05a04ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynodewidget-0.1.0.tar.gz:

Publisher: publish.yml on HenningScheufler/pynodewidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pynodewidget-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pynodewidget-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 487.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pynodewidget-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e0fbe240c5f7072e1774f3fa3efa516a4cdf888d3170ccc21c6bb5c51024c18
MD5 463bc7889cae78763e15383b045476d0
BLAKE2b-256 fa820eeacb23de0b396b7cebeafeb0acc9cce5c42d8adee074acdafc5369901e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynodewidget-0.1.0-py3-none-any.whl:

Publisher: publish.yml on HenningScheufler/pynodewidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page