File: plot_graph.py

package info (click to toggle)
python-streamz 0.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 824 kB
  • sloc: python: 6,714; makefile: 18; sh: 18
file content (13 lines) | stat: -rw-r--r-- 283 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
from streamz import Stream
from operator import add

source1 = Stream(stream_name='source1')
source2 = Stream(stream_name='source2')
source3 = Stream(stream_name='awesome source')

n1 = source1.zip(source2)
n2 = n1.map(add)
n3 = n2.zip(source3)
L = n3.sink_to_list()

n2.visualize()