Session.set_transaction() Generator[None, None, None][source]#

Context manager for a transactional set.

Can be used as a context in a with statement and bundles all node set commands into a single transaction. This reduces the network overhead and often increases the speed.

In comparison to the device level transaction manager this manager affects all devices that are connected to the Session and bundles all set commands into a single transaction.

Within the with block a set commands to a node will be buffered and bundled into a single command at the end automatically. (All other operations, e.g. getting the value of a node, will not be affected)


The set is always performed as deep set if called on device nodes.


>>> with session.set_transaction():

New in version 0.4.0.

Return type:

Generator[None, None, None]