Skip to main content

Voidmesh

A small Python 3.12+ library for building and displaying live, Obsidian-inspired force-directed graphs. Values are rendered inside draggable rounded nodes; links act like springs; gravity and repulsion settle the graph into place.

Install

uv add voidmesh

Or with pip:

python -m pip install voidmesh

For local development:

uv sync
uv run voidmesh-demo

Quick start

from voidmesh import Canvas

canvas = Canvas(title="My graph", grid=True)
python = canvas.add_node("Python", color="#fbbf24")
graphs = canvas.add_node("Graphs", color="#a78bfa")
edge = canvas.link(python, graphs, color="#38bdf8")

# Keep executing code while the window stays responsive.
canvas.show(block=False)

canvas.update_node(graphs, value="Live graphs", color="#34d399")
canvas.update_link(edge, color="#fb7185", elasticity=0.06)
canvas.wait()  # Keep the script alive until the window is closed.

All mutating methods update an open window immediately:

third = canvas.add_node("New")
canvas.relink(edge, target=third)
canvas.unlink(edge)  # or canvas.unlink(python, third)
canvas.delete_node(graphs)  # also deletes attached links
canvas.clear()
canvas.close()

Call canvas.show() without arguments for a blocking window. Drag nodes with the left mouse button, pan with the right mouse button, zoom with the wheel, and press Escape to close. fixed=True pins a node after it is dragged. The force center is the origin until fixed nodes exist, then becomes their shared center. There is no artificial limit on graph zoom.

Press E in an open window to export its graph view to voidmesh-export.png at 4K (3840×2160). To choose the output location or a higher resolution:

canvas.export_png("exports/my-graph.png", width=7680, height=4320)

The Controls panel changes center force, repulsion, link force, and link distance while the graph is moving. Drag its heading to reposition it, or click the chevron to collapse it. Press F to hide or show the panel and G to toggle the background grid.

Physics and the grid can also be controlled from Python:

canvas.configure_physics(
    center_force=0.2,
    repel_force=8,
    link_force=0.4,
    link_distance=190,
    damping=0.92,
)
canvas.toggle_grid(True)

The same values can be passed to Canvas(...). Set controls=False for a minimal window without the controls panel. Controls scale automatically with the window; use ui_scale=1.5 (or another positive multiplier) to override their size on a HiDPI display. Graph zoom and UI scale are intentionally independent.

Switch to a deterministic, physics-free hierarchy with layout="tree", the Tree button in the panel, or the T key. Links are interpreted as parent to child in this view. See the bundled example:

uv run python examples/tree_view.py

Fonts, type size, node padding and roundness, link thickness, and grid color can be set on Canvas(...) or changed live with configure_style().

Development

uv run pytest
uv run ruff check .
uv build
uv run mkdocs serve

Complete documentation lives in docs/. Build it with uv run mkdocs build --strict.

Voidmesh is licensed under the MIT License.

Release files for voidmesh 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for voidmesh 1.1.0
File Size Uploaded
voidmesh-1.1.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for voidmesh 1.1.0
File Interpreter ABI Platform
voidmesh-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / voidmesh-1.1.0.tar.gz

Download URL voidmesh-1.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
356c745e2c564abb6519d110678cf403901d625295f18ef48c5cc06a6450dc58
BLAKE2b-256 checksum
How to use checksums
b2572d348ef508469ae3d1046aec3214721392f983e8ec751d755cddd69398c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / voidmesh-1.1.0-py3-none-any.whl

Download URL voidmesh-1.1.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd653c4887b14c50376ae82d759b7553aa82d0eb7f7b906437563a48a975f523
BLAKE2b-256 checksum
How to use checksums
88ac8be8c94aaaf841450d44561413a8d19d0292bac989c5722aa8dd0f542494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page