Python 3.9 is now generally available.


A decorator that makes sure a function is run in a transaction.

Defaults propagation to datastore_rpc.TransactionOptions.ALLOWED, which means any existing transaction will be used in place of creating a new one.

WARNING: Reading from the datastore while in a transaction will not see any changes made in the same transaction. If the function being decorated relies on seeing all changes made in the calling scoope, set propagation=datastore_rpc.TransactionOptions.NESTED.

_func do not use.
**kwargs TransactionOptions configuration options.

A wrapper for the given function that creates a new transaction if needed.