Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now available in preview.

google.appengine.api.datastore.Transactional

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.