transaction=yieldFrom(protocol.multi())# Run commands in transactionf1=yieldFrom(transaction.set(u'key',u'value'))f2=yieldFrom(transaction.set(u'another_key',u'another_value'))# Commit transactionyieldFrom(transaction.execute())# Retrieve results (you can also use asyncio.tasks.gather)result1=yieldFrom(f1)result2=yieldFrom(f2)

Transaction context. This is a proxy to a RedisProtocol instance.
Every redis command called on this object will run inside the transaction.
The transaction can be finished by calling either discard or exec.