Getting started
Requirements
Voidmesh supports Python 3.12 and later and uses pygame-ce for its desktop
renderer.
Install from PyPI
With uv:
Or with pip:
To work from this repository:
Create a graph
from voidmesh import Canvas
canvas = Canvas(title="First graph", width=1000, height=700)
hello = canvas.add_node("Hello", color="#a78bfa")
world = canvas.add_node("World", color="#38bdf8")
canvas.link(hello, world, color="#64748b")
canvas.show()
show() blocks until the window closes. Use non-blocking mode when code needs
to keep modifying the graph:
wait() keeps the script alive until the user closes the window.
Mouse and keyboard controls
| Input | Action |
|---|---|
| Left-drag a node | Move the node |
| Right- or middle-drag | Pan the canvas |
| Mouse wheel | Zoom around the cursor |
G |
Toggle the grid |
F |
Hide or show the controls |
T |
Switch force/tree view |
Esc |
Close the window |
Drag the Controls panel by its heading. Click its chevron to collapse it.