def retrieve_all_files(service):
    """ RETURNS a list of files, where each file is a dictionary containing
        keys: [name, id, parents]
    """
query = 'trashed=false'
page_token = None
L = []
while True:
    response = service.files().list(q=query, spaces='drive', fields=
        'nextPageToken, files(id, name, parents)', pageToken=page_token
        ).execute()
for file in response.get('files', []):
    L.append({'name': file.get('name'), 'id': file.get('id'), 'parents':
        file.get('parents')})
No Google Drive files are listed in Drive API request