free google drive shared drive code example
Example: pydrive shared drive
team_drive_id = 'XXXXXXXXXXXXX'
parent_folder_id = 'XXXXXXXXXXXXX'
f = drive.CreateFile({
'title': 'test.txt',
'parents': [{
'kind': 'drive#fileLink',
'teamDriveId': team_drive_id,
'id': parent_folder_id
}]
})
f.SetContentString('Hello World')
f.Upload(param={'supportsTeamDrives': True})