voidmesh 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
voidmesh-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aahan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: voidmesh
3
+ Version: 0.1.0
4
+ Summary: Live force-directed graphs and systematic trees for Python
5
+ Keywords: graph,visualization,nodes,physics,canvas
6
+ Author: Aahan
7
+ Author-email: Aahan <188063520+aahan0511@users.noreply.github.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Classifier: Topic :: Scientific/Engineering :: Visualization
13
+ Requires-Dist: pygame-ce>=2.5.8
14
+ Requires-Python: >=3.14
15
+ Description-Content-Type: text/markdown
16
+
17
+ # Voidmesh
18
+
19
+ A small Python 3.14 library for building and displaying live, Obsidian-inspired
20
+ force-directed graphs. Values are rendered inside draggable rounded nodes;
21
+ links act like springs; gravity and repulsion settle the graph into place.
22
+
23
+ ## Install
24
+
25
+ ```console
26
+ uv add voidmesh
27
+ ```
28
+
29
+ For local development:
30
+
31
+ ```console
32
+ uv sync
33
+ uv run voidmesh-demo
34
+ ```
35
+
36
+ ## Quick start
37
+
38
+ ```python
39
+ from voidmesh import Canvas
40
+
41
+ canvas = Canvas(title="My graph", grid=True)
42
+ python = canvas.add_node("Python", color="#fbbf24")
43
+ graphs = canvas.add_node("Graphs", color="#a78bfa")
44
+ edge = canvas.link(python, graphs, color="#38bdf8")
45
+
46
+ # Keep executing code while the window stays responsive.
47
+ canvas.show(block=False)
48
+
49
+ canvas.update_node(graphs, value="Live graphs", color="#34d399")
50
+ canvas.update_link(edge, color="#fb7185", elasticity=0.06)
51
+ canvas.wait() # Keep the script alive until the window is closed.
52
+ ```
53
+
54
+ All mutating methods update an open window immediately:
55
+
56
+ ```python
57
+ third = canvas.add_node("New")
58
+ canvas.relink(edge, target=third)
59
+ canvas.unlink(edge) # or canvas.unlink(python, third)
60
+ canvas.delete_node(graphs) # also deletes attached links
61
+ canvas.clear()
62
+ canvas.close()
63
+ ```
64
+
65
+ Call `canvas.show()` without arguments for a blocking window. Drag nodes with
66
+ the left mouse button, pan with the right mouse button, zoom with the wheel, and
67
+ press Escape to close. `fixed=True` pins a node after it is dragged.
68
+
69
+ The **Controls** panel changes center force, repulsion, link force, and link
70
+ distance while the graph is moving. Drag its heading to reposition it, or click
71
+ the chevron to collapse it. Press `F` to hide or show the panel and `G` to
72
+ toggle the background grid.
73
+
74
+ Physics and the grid can also be controlled from Python:
75
+
76
+ ```python
77
+ canvas.configure_physics(
78
+ center_force=0.2,
79
+ repel_force=8,
80
+ link_force=0.4,
81
+ link_distance=190,
82
+ damping=0.92,
83
+ )
84
+ canvas.toggle_grid(True)
85
+ ```
86
+
87
+ The same values can be passed to `Canvas(...)`. Set `controls=False` for a
88
+ minimal window without the controls panel. Controls scale automatically with the
89
+ window; use `ui_scale=1.5` (or another positive multiplier) to override their
90
+ size on a HiDPI display. Graph zoom and UI scale are intentionally independent.
91
+
92
+ Switch to a deterministic, physics-free hierarchy with `layout="tree"`, the
93
+ Tree button in the panel, or the `T` key. Links are interpreted as parent to
94
+ child in this view. See the bundled example:
95
+
96
+ ```console
97
+ uv run python examples/tree_view.py
98
+ ```
99
+
100
+ Fonts, type size, node padding and roundness, link thickness, and grid color
101
+ can be set on `Canvas(...)` or changed live with `configure_style()`.
102
+
103
+ ## Development
104
+
105
+ ```console
106
+ uv run pytest
107
+ uv run ruff check .
108
+ uv build
109
+ uv run mkdocs serve
110
+ ```
111
+
112
+ Complete documentation lives in [`docs/`](docs/index.md). Build it with
113
+ `uv run mkdocs build --strict`.
114
+
115
+ Voidmesh is licensed under the MIT License.
@@ -0,0 +1,99 @@
1
+ # Voidmesh
2
+
3
+ A small Python 3.14 library for building and displaying live, Obsidian-inspired
4
+ force-directed graphs. Values are rendered inside draggable rounded nodes;
5
+ links act like springs; gravity and repulsion settle the graph into place.
6
+
7
+ ## Install
8
+
9
+ ```console
10
+ uv add voidmesh
11
+ ```
12
+
13
+ For local development:
14
+
15
+ ```console
16
+ uv sync
17
+ uv run voidmesh-demo
18
+ ```
19
+
20
+ ## Quick start
21
+
22
+ ```python
23
+ from voidmesh import Canvas
24
+
25
+ canvas = Canvas(title="My graph", grid=True)
26
+ python = canvas.add_node("Python", color="#fbbf24")
27
+ graphs = canvas.add_node("Graphs", color="#a78bfa")
28
+ edge = canvas.link(python, graphs, color="#38bdf8")
29
+
30
+ # Keep executing code while the window stays responsive.
31
+ canvas.show(block=False)
32
+
33
+ canvas.update_node(graphs, value="Live graphs", color="#34d399")
34
+ canvas.update_link(edge, color="#fb7185", elasticity=0.06)
35
+ canvas.wait() # Keep the script alive until the window is closed.
36
+ ```
37
+
38
+ All mutating methods update an open window immediately:
39
+
40
+ ```python
41
+ third = canvas.add_node("New")
42
+ canvas.relink(edge, target=third)
43
+ canvas.unlink(edge) # or canvas.unlink(python, third)
44
+ canvas.delete_node(graphs) # also deletes attached links
45
+ canvas.clear()
46
+ canvas.close()
47
+ ```
48
+
49
+ Call `canvas.show()` without arguments for a blocking window. Drag nodes with
50
+ the left mouse button, pan with the right mouse button, zoom with the wheel, and
51
+ press Escape to close. `fixed=True` pins a node after it is dragged.
52
+
53
+ The **Controls** panel changes center force, repulsion, link force, and link
54
+ distance while the graph is moving. Drag its heading to reposition it, or click
55
+ the chevron to collapse it. Press `F` to hide or show the panel and `G` to
56
+ toggle the background grid.
57
+
58
+ Physics and the grid can also be controlled from Python:
59
+
60
+ ```python
61
+ canvas.configure_physics(
62
+ center_force=0.2,
63
+ repel_force=8,
64
+ link_force=0.4,
65
+ link_distance=190,
66
+ damping=0.92,
67
+ )
68
+ canvas.toggle_grid(True)
69
+ ```
70
+
71
+ The same values can be passed to `Canvas(...)`. Set `controls=False` for a
72
+ minimal window without the controls panel. Controls scale automatically with the
73
+ window; use `ui_scale=1.5` (or another positive multiplier) to override their
74
+ size on a HiDPI display. Graph zoom and UI scale are intentionally independent.
75
+
76
+ Switch to a deterministic, physics-free hierarchy with `layout="tree"`, the
77
+ Tree button in the panel, or the `T` key. Links are interpreted as parent to
78
+ child in this view. See the bundled example:
79
+
80
+ ```console
81
+ uv run python examples/tree_view.py
82
+ ```
83
+
84
+ Fonts, type size, node padding and roundness, link thickness, and grid color
85
+ can be set on `Canvas(...)` or changed live with `configure_style()`.
86
+
87
+ ## Development
88
+
89
+ ```console
90
+ uv run pytest
91
+ uv run ruff check .
92
+ uv build
93
+ uv run mkdocs serve
94
+ ```
95
+
96
+ Complete documentation lives in [`docs/`](docs/index.md). Build it with
97
+ `uv run mkdocs build --strict`.
98
+
99
+ Voidmesh is licensed under the MIT License.
@@ -0,0 +1,45 @@
1
+ [project]
2
+ name = "voidmesh"
3
+ version = "0.1.0"
4
+ description = "Live force-directed graphs and systematic trees for Python"
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ keywords = [
10
+ "graph",
11
+ "visualization",
12
+ "nodes",
13
+ "physics",
14
+ "canvas",
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Topic :: Scientific/Engineering :: Visualization",
20
+ ]
21
+ dependencies = ["pygame-ce>=2.5.8"]
22
+
23
+ [[project.authors]]
24
+ name = "Aahan"
25
+ email = "188063520+aahan0511@users.noreply.github.com"
26
+
27
+ [project.scripts]
28
+ voidmesh-demo = "voidmesh.demo:main"
29
+
30
+ [build-system]
31
+ requires = ["uv_build>=0.12.6,<0.13.0"]
32
+ build-backend = "uv_build"
33
+
34
+ [tool.pytest.ini_options]
35
+ testpaths = ["tests"]
36
+
37
+ [tool.ruff]
38
+ line-length = 96
39
+
40
+ [dependency-groups]
41
+ dev = [
42
+ "mkdocs-material>=9.7.7",
43
+ "pytest>=9.1.1",
44
+ "ruff>=0.16.8",
45
+ ]
@@ -0,0 +1,40 @@
1
+ [project]
2
+ name = "voidmesh"
3
+ version = "0.1.0"
4
+ description = "Live force-directed graphs and systematic trees for Python"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name = "Aahan", email = "188063520+aahan0511@users.noreply.github.com" }
8
+ ]
9
+ requires-python = ">=3.14"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ keywords = ["graph", "visualization", "nodes", "physics", "canvas"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Programming Language :: Python :: 3.14",
16
+ "Topic :: Scientific/Engineering :: Visualization",
17
+ ]
18
+ dependencies = [
19
+ "pygame-ce>=2.5.8",
20
+ ]
21
+
22
+ [project.scripts]
23
+ voidmesh-demo = "voidmesh.demo:main"
24
+
25
+ [build-system]
26
+ requires = ["uv_build>=0.12.6,<0.13.0"]
27
+ build-backend = "uv_build"
28
+
29
+ [tool.pytest.ini_options]
30
+ testpaths = ["tests"]
31
+
32
+ [tool.ruff]
33
+ line-length = 96
34
+
35
+ [dependency-groups]
36
+ dev = [
37
+ "mkdocs-material>=9.7.7",
38
+ "pytest>=9.1.1",
39
+ "ruff>=0.16.8",
40
+ ]
@@ -0,0 +1,7 @@
1
+ """A tiny, live, physics-based graph canvas."""
2
+
3
+ from .canvas import Canvas
4
+ from .models import Link, Node
5
+
6
+ __all__ = ["Canvas", "Link", "Node"]
7
+ __version__ = "0.1.0"