Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A visualization tool to show a ascii graph from Graphviz-Dot-file or Tensorflow

Project description

stacked-dag for python

Build Status

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 >
digraph graphname {
  0 [label="l0"];
  1 [label="l1"];
  2 [label="l2"];
  3 [label="l3"];
  4 [label="l4"];

Show ascii DAG by following command.

$ python
o o    l0,l4
o    l1
o    l2
o    l3

Usage with tensorflow

import tensorflow as tf
import 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()


The output is below.

o o    a,b
o    c

Another sample

$ python sample/
o |
| |\
o o |
|\ \ \
| | |\ \
| | | | |\
o o o o o |
|/ /_/ / /
| |  / /
o o o o

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stackeddag, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size stackeddag-0.3.2.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page