file download from google drive to colaboratory

后端 未结 7 2278
遇见更好的自我
遇见更好的自我 2021-02-05 12:22

I was trying to download file from my google drive to colaboratory.

file_id = \'1uBtlaggVyWshwcyP6kEI-y_W3P8D26sz\'

import io
from googleapiclient.http import M         


        
7条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 12:47

    You need to define a drive API service client to interact with the Google drive API, for instance:

    from googleapiclient.discovery import build
    drive_service = build('drive', 'v3')
    

    (see the notebook External data: Drive, Sheets, and Cloud Storage/Drive REST API)

提交回复
热议问题