Products | Versions |
---|---|
TIBCO Streaming | - |
I have a field in my schema that is a list of tuples. How can I set the value of this field using the Python Client API?
<schema name="schema:BidsIn" uuid="C335B2728CBCBFD791A7BB86D024B5AD"> <field description="" name="bids" type="list"> <element-type type="tuple"> <schema uuid="EF44BB76767F7028D9EF4D3A62BF750A"> <field description="" name="Price" type="double"/> <field description="" name="Volume" type="int"/> </schema> </element-type> </field> </schema>use the following syntax to enqueue:
client = sb.Client("sb://localhost") client.enqueue("BidsIn", {'bids': [ {'Price': 10.0, 'Volume': 100}, {'Price': 5.0, 'Volume': 50}]}) client.close()