Create node-based workflow
Project description
Documentation
Please refer to online docs.
Examples
A simple math calculation
from node_graph import task
@task()
def add(x, y):
return x + y
@task()
def multiply(x, y):
return x * y
@task.graph()
def AddMultiply(x, y, z):
the_sum = add(x=x, y=y).result
return multiply(x=the_sum, y=z).result
Engines and provenance
Explore different execution engines in node-graph-engine.
Run the above graph locally with the LocalEngine and export the provenance graph:
from node_graph.engine.local import LocalEngine
graph = AddMultiply.build(x=1, y=2, z=3)
engine = LocalEngine()
results = engine.run(graph)
# export provenance for visualization
engine.recorder.save_graphviz_svg("add_multiply.svg")
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
node_graph-0.6.5.tar.gz
(100.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
node_graph-0.6.5-py3-none-any.whl
(117.8 kB
view details)
File details
Details for the file node_graph-0.6.5.tar.gz.
File metadata
- Download URL: node_graph-0.6.5.tar.gz
- Upload date:
- Size: 100.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25114f96e3154aeccac8faf75cde16e8acaf772e0cc34857d446c1145ae30cde
|
|
| MD5 |
4048cf930ffcaa38b237ffa0b7475258
|
|
| BLAKE2b-256 |
12faf64cb06871fc56c43f34f799b68f84321451e0f821ccc5b9a76a8207d92a
|
File details
Details for the file node_graph-0.6.5-py3-none-any.whl.
File metadata
- Download URL: node_graph-0.6.5-py3-none-any.whl
- Upload date:
- Size: 117.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4efe5acd8900f9cf872b90f3bc0afccd63651c3bf7705bd6edfbd55e1dd2c471
|
|
| MD5 |
95a98e0e9b2de937ada1496893333871
|
|
| BLAKE2b-256 |
d75afee76af3ad82de6ce8708846bc1c6217792cde04f8acc23991c8dc496731
|