PyDrive icon indicating copy to clipboard operation
PyDrive copied to clipboard

wanna List All My Team drive .

Open aryanvikash opened this issue 5 years ago • 3 comments

I wanna list all my teamdrive in pydrive But not able to Find any method

Here is official method But Need it in pydrive https://developers.google.com/drive/api/v3/reference/drives/list

please someone give me pydrive code for that

aryanvikash avatar Dec 24 '19 12:12 aryanvikash

I was able to enter the team drive like this


drive = GoogleDrive()
file_list = drive.ListFile(
    {
        'q': "'YOUR TEAM DRIVE ID HERE' in parents and trashed=false",
        'teamDriveId': "YOUR TEAM DRIVE ID HERE",
        'corpora':"teamDrive",
        'includeTeamDriveItems': "true",
        'supportsTeamDrives': "true"
    }
).GetList()
for file1 in file_list:
    print('title: %s, id: %s' % (file1['title'], file1['id']))

rayanfer32 avatar Sep 10 '20 06:09 rayanfer32

Has anyone found solutions?

Taoshan98 avatar Jan 01 '21 15:01 Taoshan98

@Taoshan98 have you tried to use PyDrive2 - it has related changes. At least we definitely support team drives in DVC - the main user of the PyDrive2.

shcheklein avatar Jan 01 '21 18:01 shcheklein