def rename_blob(bucket_name, blob_name, new_name):
 storage_client = storage.Client()
 bucket = storage_client.get_bucket(bucket_name)
 blob = bucket.blob(blob_name)
 new_blob = bucket.rename_blob(blob, new_name)
 print 'Blob {} has been renamed to {}'.format(blob.name, new_blob.name)

def rename_blob ( bucket_name , blob_name , new_name ) : storage_client = storage . Client ( ) bucket = storage_client . get_bucket ( bucket_name ) blob = bucket . blob ( blob_name ) new_blob = bucket . rename_blob ( blob , new_name ) print 'Blob {} has been renamed to {}' . format ( blob . name , new_blob . name )
renames a blob .