def AllocateIdsAsync(model_key, size=None, **kwargs):
 max = kwargs.pop('max', None)
 config = _GetConfigFromKwargs(kwargs)
 if (getattr(config, 'read_policy', None) == EVENTUAL_CONSISTENCY):
  raise datastore_errors.BadRequestError('read_policy is only supported on read operations.')
 (keys, _) = NormalizeAndTypeCheckKeys(model_key)
 if (len(keys) > 1):
  raise datastore_errors.BadArgumentError('Cannot allocate IDs for more than one model key at a time')
 rpc = _GetConnection().async_allocate_ids(config, keys[0], size, max)
 return rpc

def AllocateIdsAsync ( model_key , size = None , ** kwargs ) : max = kwargs . pop ( 'max' , None ) config = _GetConfigFromKwargs ( kwargs ) if ( getattr ( config , 'read_policy' , None ) == EVENTUAL_CONSISTENCY ) : raise datastore_errors . BadRequestError ( 'read_policy is only supported on read operations.' ) ( keys , _ ) = NormalizeAndTypeCheckKeys ( model_key ) if ( len ( keys ) > 1 ) : raise datastore_errors . BadArgumentError ( 'Cannot allocate IDs for more than one model key at a time' ) rpc = _GetConnection ( ) . async_allocate_ids ( config , keys [ 0 ] , size , max ) return rpc
asynchronously allocates a range of ids .