def create_upload_url_async(success_path, max_bytes_per_blob=None, max_bytes_total=None, rpc=None, gs_bucket_name=None):
 request = blobstore_service_pb.CreateUploadURLRequest()
 response = blobstore_service_pb.CreateUploadURLResponse()
 request.set_success_path(success_path)
 if (max_bytes_per_blob is not None):
  if (not isinstance(max_bytes_per_blob, (int, long))):
   raise TypeError('max_bytes_per_blob must be integer.')
  if (max_bytes_per_blob < 1):
   raise ValueError('max_bytes_per_blob must be positive.')
  request.set_max_upload_size_per_blob_bytes(max_bytes_per_blob)
 if (max_bytes_total is not None):
  if (not isinstance(max_bytes_total, (int, long))):
   raise TypeError('max_bytes_total must be integer.')
  if (max_bytes_total < 1):
   raise ValueError('max_bytes_total must be positive.')
  request.set_max_upload_size_bytes(max_bytes_total)
 if (request.has_max_upload_size_bytes() and request.has_max_upload_size_per_blob_bytes()):
  if (request.max_upload_size_bytes() < request.max_upload_size_per_blob_bytes()):
   raise ValueError('max_bytes_total can not be less than max_upload_size_per_blob_bytes')
 if (gs_bucket_name is not None):
  if (not isinstance(gs_bucket_name, basestring)):
   raise TypeError('gs_bucket_name must be a string.')
  request.set_gs_bucket_name(gs_bucket_name)
 return _make_async_call(rpc, 'CreateUploadURL', request, response, _get_result_hook, (lambda rpc: rpc.response.url()))

def create_upload_url_async ( success_path , max_bytes_per_blob = None , max_bytes_total = None , rpc = None , gs_bucket_name = None ) : request = blobstore_service_pb . CreateUploadURLRequest ( ) response = blobstore_service_pb . CreateUploadURLResponse ( ) request . set_success_path ( success_path ) if ( max_bytes_per_blob is not None ) : if ( not isinstance ( max_bytes_per_blob , ( int , long ) ) ) : raise TypeError ( 'max_bytes_per_blob must be integer.' ) if ( max_bytes_per_blob < 1 ) : raise ValueError ( 'max_bytes_per_blob must be positive.' ) request . set_max_upload_size_per_blob_bytes ( max_bytes_per_blob ) if ( max_bytes_total is not None ) : if ( not isinstance ( max_bytes_total , ( int , long ) ) ) : raise TypeError ( 'max_bytes_total must be integer.' ) if ( max_bytes_total < 1 ) : raise ValueError ( 'max_bytes_total must be positive.' ) request . set_max_upload_size_bytes ( max_bytes_total ) if ( request . has_max_upload_size_bytes ( ) and request . has_max_upload_size_per_blob_bytes ( ) ) : if ( request . max_upload_size_bytes ( ) < request . max_upload_size_per_blob_bytes ( ) ) : raise ValueError ( 'max_bytes_total can not be less than max_upload_size_per_blob_bytes' ) if ( gs_bucket_name is not None ) : if ( not isinstance ( gs_bucket_name , basestring ) ) : raise TypeError ( 'gs_bucket_name must be a string.' ) request . set_gs_bucket_name ( gs_bucket_name ) return _make_async_call ( rpc , 'CreateUploadURL' , request , response , _get_result_hook , ( lambda rpc : rpc . response . url ( ) ) )
async version of create_upload_url() .