相关疑难解决方法(0)

如何使用 Box API 和 Python 下载文件

我目前有我的代码的上传部分工作,我将如何将其转换为将从 box 文件夹中下载相应文件的程序?

这是上传程序:

import requests
import json

#the user acces token
access_token =  'UfUNeHhv4gIxFCn5WEXHgBJwfG8gHT2o'
#the name of the file as you want it to appear in box
dst_filename = 'box_file'
#the actual file path
src_directory = 'C:\Python\cache\\'
#the name of the file to be transferred
src_filename = 'Wildlife.wmv'
#the id of the folder you want to upload to
parent_id = '0'
counter = 1

for counter in range(1, 6):
  src_file = (src_directory + src_filename + '-' + str(counter))
  print(src_file) …
Run Code Online (Sandbox Code Playgroud)

python python-3.x box-api boxapiv2

9
推荐指数
3
解决办法
2万
查看次数

标签 统计

box-api ×1

boxapiv2 ×1

python ×1

python-3.x ×1