[Streaming] Streaming Python API (#6755)

This commit is contained in:
chaokunyang
2020-02-25 10:33:33 +08:00
committed by GitHub
parent 2c1f4fd82c
commit 8b6784de06
71 changed files with 2701 additions and 1928 deletions
+17
View File
@@ -0,0 +1,17 @@
class Record:
"""Data record in data stream"""
def __init__(self, value):
self.value = value
self.stream = None
def __repr__(self):
return "Record(%s)".format(self.value)
class KeyRecord(Record):
"""Data record in a keyed data stream"""
def __init__(self, key, value):
super().__init__(value)
self.key = key