How to set list to StreamBase tuple with Python

How to set list to StreamBase tuple with Python

book

Article ID: KB0075980

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7.7.x

Description

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}]


 

Issue/Introduction

How to set list to StreamBase tuple with Python

Environment

All Supported Environments