dagex 2026.15__cp310-cp310-manylinux_2_34_x86_64.whl

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.
dagex/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .dagex import *
2
+
3
+ __doc__ = dagex.__doc__
4
+ if hasattr(dagex, "__all__"):
5
+ __all__ = dagex.__all__
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.1
2
+ Name: dagex
3
+ Version: 2026.15
4
+ Summary: A pure Rust DAG executor supporting implicit node connections, branching, and config sweeps
5
+ Keywords: dag,graph,execution,pipeline,workflow
6
+ Home-Page: https://github.com/briday1/dagex
7
+ Author: briday1 <your-email@example.com>
8
+ Author-email: briday1 <your-email@example.com>
9
+ License: MIT
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
12
+ Project-URL: Source Code, https://github.com/briday1/dagex
13
+
14
+ Real run (captured from `/Users/brian.day/git/graph-sp/.venv/bin/python examples/py/python_demo.py`):
15
+
16
+ ```
17
+ ======================================================================
18
+ ```
19
+ Creating graph...
20
+ Adding source node...
21
+ Adding processor node...
22
+ Adding formatter node...
23
+
24
+ ````markdown
25
+ Mermaid (example):
26
+
27
+ ```
28
+ graph TD
29
+ 0["Source"]
30
+ 1["Processor"]
31
+ 2["Formatter"]
32
+ 0 -->|data → input| 1
33
+ 1 -->|final → value| 2
34
+ ```
35
+ ```bash
36
+ pip install dagex
37
+ ```
38
+
39
+ Quick overview:
40
+
41
+ - Build a graph by adding functions (callables)
42
+ - Inputs/outputs are mapped by names (broadcast → function param)
43
+ - Branching and variants are supported
44
+ - Use `to_mermaid()` to visualize the DAG
45
+ - Execution returns a context-like mapping with results
46
+
47
+ ---
48
+
49
+ ## Minimal Python example
50
+
51
+ ```python
52
+ import dagex
53
+
54
+ # Data source
55
+ def generate(_):
56
+ return {"n": 7}
57
+
58
+ # Processor
59
+ def double(inputs):
60
+ v = inputs.get("x", 0)
61
+ return {"y": v * 2}
62
+
63
+ # Build graph
64
+ g = dagex.Graph()
65
+ g.add(generate, label="Source", inputs=None, outputs=[("n", "x")])
66
+ g.add(double, label="Double", inputs=[("x", "x")], outputs=[("y", "out")])
67
+
68
+ # Visualize and run
69
+ dag = g.build()
70
+ print('\nMermaid:\n', dag.to_mermaid())
71
+ context = dag.execute(parallel=False)
72
+ print('Result:', context.get('out'))
73
+ ```
74
+
75
+ Expected output:
76
+
77
+ ```
78
+ Result: 14
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Branching & Merging (Python)
84
+
85
+ ```python
86
+ import dagex
87
+
88
+ # source
89
+ def src(_):
90
+ return {"base": 50}
91
+
92
+ # branch functions
93
+ def add10(inputs):
94
+ return {"result": inputs.get("x", 0) + 10}
95
+
96
+ def add20(inputs):
97
+ return {"result": inputs.get("x", 0) + 20}
98
+
99
+ # graph
100
+ g = dagex.Graph()
101
+ g.add(src, label='Source', inputs=None, outputs=[('base', 'x')])
102
+
103
+ b1 = dagex.Graph()
104
+ b1.add(add10, label='A', inputs=[('x','x')], outputs=[('result','result')])
105
+
106
+ b2 = dagex.Graph()
107
+ b2.add(add20, label='B', inputs=[('x','x')], outputs=[('result','result')])
108
+
109
+ id1 = g.branch(b1)
110
+ id2 = g.branch(b2)
111
+
112
+ # merge maps branch-specific result -> local names
113
+ g.merge(lambda inputs: {"combined": inputs.get('from_a', 0) + inputs.get('from_b', 0)},
114
+ label='Merge',
115
+ inputs=[(id1, 'result', 'from_a'), (id2, 'result', 'from_b')],
116
+ outputs=[('combined', 'final')])
117
+
118
+ dag = g.build()
119
+ print(dag.to_mermaid())
120
+ res = dag.execute(parallel=True)
121
+ print('Final:', res.get('final'))
122
+ ```
123
+
124
+ Expected output:
125
+
126
+ ```
127
+ Final: 130
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Variants (parameter sweep)
133
+
134
+ ```python
135
+ import dagex
136
+
137
+ # Source
138
+ def src(_):
139
+ return {"base": 10}
140
+
141
+ # Variant function builder (captures factor)
142
+ def make_mul(factor):
143
+ def mul(inputs):
144
+ v = inputs.get('x', 0)
145
+ return {'result': v * factor}
146
+ return mul
147
+
148
+ g = dagex.Graph()
149
+ g.add(src, label='Source', inputs=None, outputs=[('base','x')])
150
+
151
+ factors = [2,3,5]
152
+ funcs = [make_mul(f) for f in factors]
153
+ # wrap callables appropriately; the Python binding accepts callables directly
154
+ g.variants(funcs, label='Multiply', inputs=[('x','x')], outputs=[('result','final')])
155
+
156
+ dag = g.build()
157
+ print(dag.to_mermaid())
158
+ ctx = dag.execute(parallel=True)
159
+ print('Final:', ctx.get('final'))
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Notes & Tips
165
+
166
+ - The Python API mirrors the Rust API closely. When in doubt, consult the Rust README for conceptual diagrams.
167
+ - For large data, prefer providing structures that can be shared (e.g. numpy arrays wrapped appropriately) to avoid copies.
168
+ - Use `dag.execute(parallel=True, max_threads=4)` to limit thread usage.
169
+
170
+ ---
171
+
172
+ ## Where to get help
173
+
174
+ - Docs: https://docs.rs/dagex
175
+ - Issues / PRs: https://github.com/briday1/graph-sp
176
+
177
+ ---
178
+
179
+ <p align="center">Built with ❤️ — enjoy composing DAGs!</p>
180
+
@@ -0,0 +1,5 @@
1
+ dagex-2026.15.dist-info/METADATA,sha256=3CplVIlzUvAQCfDX_icaJ8xALGduNUaFZ4oIobJzBAs,4011
2
+ dagex-2026.15.dist-info/WHEEL,sha256=4JO83XJFOmStWS-Qj5BwhHXFb7Bp_IDsmgflwVQvPn4,108
3
+ dagex/__init__.py,sha256=uHbe0OdI2RMIcYORKDaI9JvEPcs3Iqxzy3Z5gpiCOiM,103
4
+ dagex/dagex.cpython-310-x86_64-linux-gnu.so,sha256=Ll_WGmd1PGUhUrRCV-hoLMyLuvrB7foIu5fRGNcsAsg,862608
5
+ dagex-2026.15.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.2.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-cp310-manylinux_2_34_x86_64