def get_gs_object(bucket_name, path):
 scope = 'https://www.googleapis.com/auth/devstorage.read_only'
 url = ('https://%s.commondatastorage.googleapis.com/%s' % (bucket_name, path))
 (auth_token, _) = app_identity.get_access_token(scope)
 result = urlfetch.fetch(url, method=urlfetch.GET, headers={'Authorization': ('OAuth %s' % auth_token), 'x-goog-api-version': '2'})
 if (result and (result.status_code == 200)):
  return result.content
 raise BackupValidationException('Requested path was not found')

def get_gs_object ( bucket_name , path ) : scope = 'https://www.googleapis.com/auth/devstorage.read_only' url = ( 'https://%s.commondatastorage.googleapis.com/%s' % ( bucket_name , path ) ) ( auth_token , _ ) = app_identity . get_access_token ( scope ) result = urlfetch . fetch ( url , method = urlfetch . GET , headers = { 'Authorization' : ( 'OAuth %s' % auth_token ) , 'x-goog-api-version' : '2' } ) if ( result and ( result . status_code == 200 ) ) : return result . content raise BackupValidationException ( 'Requested path was not found' )
returns a listing of of a bucket that matches the given prefix .