📜  python PyDrive 服务帐户凭据 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:11.819000             🧑  作者: Mango

代码示例1
gauth = GoogleAuth()
scope = ['https://www.googleapis.com/auth/drive']
gauth.credentials = ServiceAccountCredentials.from_json_keyfile_name(JSON_FILE, scope)
drive = GoogleDrive(gauth)

my_file = drive.CreateFile({'id': 'FILE_ID'})