

@utils.decorator
def transactional(func, args, kwds, **options):
    'Decorator to make a function automatically run in a transaction.\n\n  Args:\n    **ctx_options: Transaction options (see transaction(), but propagation\n      default to TransactionOptions.ALLOWED).\n\n  This supports two forms:\n\n  (1) Vanilla:\n      @transactional\n      def callback(arg):\n        ...\n\n  (2) With options:\n      @transactional(retries=1)\n      def callback(arg):\n        ...\n  '
    return transactional_async.wrapped_decorator(func, args, kwds, **options).get_result()

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py transactional/original