| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Panel wrapper for the React Flow JS library.
This project is in its early stages, so if you find a version that suits your needs, it’s recommended to pin your version, as updates may introduce changes.
Install it via pip:
pip install panel-reactflowimport panel as pn
from panel_reactflow import ReactFlow
pn.extension("jsoneditor")
nodes = [
{
"id": "n1",
"position": {"x": 0, "y": 0},
"type": "panel",
"label": "Start",
"data": {},
"view": pn.pane.Markdown("Node 1 content"),
},
{
"id": "n2",
"position": {"x": 260, "y": 60},
"type": "panel",
"label": "End",
"data": {},
"view": pn.pane.Markdown("Node 2 content"),
},
]
edges = [
{"id": "e1", "source": "n1", "target": "n2"},
]
flow = ReactFlow(
nodes=nodes,
edges=edges,
)
flowFor property schemas and richer editors, provide node_types/edge_types with PropertySpec and handle changes via ReactFlow.on(...). .on callbacks receive the event payload as the first argument and can optionally accept the ReactFlow instance as a second argument.
git clone https://github.com/panel-extensions/panel-reactflow
cd panel-reactflowFor a simple setup use uv:
uv venv
source .venv/bin/activate # on linux. Similar commands for windows and osx
uv pip install -e .[dev]
pre-commit run install
pytest testsFor the full Github Actions setup use pixi:
pixi run pre-commit-install
pixi run postinstall
pixi run testThis repository is based on copier-template-panel-extension (you can create your own Panel extension with it)!
To update to the latest template version run:
pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trustNote: copier will show Conflict for files with manual changes during an update. This is normal. As long as there are no merge conflict markers, all patches applied cleanly.
Contributions are welcome! Please follow these steps to contribute:
Please ensure your code adheres to the project's coding standards and passes all tests.
| Back | FazBrowse Home | New Git URL |