Products | Versions |
---|---|
TIBCO Streaming | 7.7.x |
Python program can exploit between StreamBase lists and Python lists.
For example, to enqueue tuples having schema {list bids{double Price, int Volume}}, your Python client code would be:
client = sb.Client("sb://localhost") client.enqueue("BidsIn", {'bids': [ {'Price': 10.0, 'Volume': 100}, {'Price': 5.0, 'Volume': 50}]}) # ... is equivalent to ... tuple['bids'] = [ {'Price': 10.0, 'Volume': 100}, {'Price': 5.0, 'Volume': 50}] # ... is equivalent to ... tuple[0]=[ {'Price': 11.0, 'Volume': 100}, {'Price': 5.0, 'Volume': 50}]