stacked-dag for python
Ascii DAG for visualization of dataflow
stacked-dag can show Ascii-DAG(Directed acyclic graph) from a Dot file of graphviz. Dataflow’s direction is from top to bottom. ‘o’ means a node. A label of the node is shown to the left side. Other characters are edges of DAG.
A sample of DAG is below.
o o l0,l4 |/ o l1 | o l2 | o l3
Usage with dot
Write a Dot file of graphviz.
$ cat > sample.dot
digraph graphname {
0 [label="l0"];
1 [label="l1"];
2 [label="l2"];
3 [label="l3"];
4 [label="l4"];
0->1;
1->2;
2->3;
4->1;
}
Show ascii DAG by following command.
$ python stackeddag.py sample.dot o o l0,l4 |/ o l1 | o l2 | o l3
Usage with tensorflow
import tensorflow as tf import stackeddag.tf as sd def mydataflow(): a = tf.constant(1,name="a") b = tf.constant(2,name="b") c = tf.add(a,b,name="c") return tf.get_default_graph() print(sd.fromGraph(mydataflow()),end="")
The output is below.
o o a,b |/ o c
Another sample
$ python stackeddag.py sample/test.dot o | o |\ o | | |\ o o | |\ \ \ | | |\ \ | | | | |\ o o o o o | |/ /_/ / / | | / / o o o o |/_/_/ o
Metadata
Release files for stackeddag 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stackeddag-0.3.4.tar.gz | 8.9 kB | Without provenance | Details for stackeddag-0.3.4.tar.gz |
Release files / stackeddag-0.3.4.tar.gz
| Download URL | stackeddag-0.3.4.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89404050364710f25188812248735fed34dae90c001e35e74bff7fc15a9f970b
|
|
BLAKE2b-256 checksum How to use checksums |
77fa0bd0138ca78cc0e843206c2f14ac9367d2816b638962bee56fb00b8439ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
|
Security for stackeddag 0.3.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.