chmod740 / cos-python3-sdk Goto Github PK
View Code? Open in Web Editor NEW腾讯云对象存储服务(cos)Python3.5版本SDK
License: Apache License 2.0
腾讯云对象存储服务(cos)Python3.5版本SDK
License: Apache License 2.0
def CreateFolder_Tecent():
cos = Cos(app_id=1,secret_id='AKIDAlGaXKV5',secret_key='iEYfhYlhWBg097tX2Pdg',region='gz')
bucket = cos.get_bucket("ExcelFile")
bucket.create_folder("/ExcelFileUser")
print("create bucket success")
def exportExcelFile():
cos = Cos(app_id=1256960769,secret_id='AKIDAlGaXKVLZcT9exqi8PVP7ez97tTxOOK5',secret_key='iEYfhYFoESUKzSkYEilhWBg097tX2Pdg',region='gz')
bucket = cos.get_bucket("ExcelFile")
real_file_path="/Users/dempsey/Desktop/Sample.xlsx"
file_name_inBucket = "Sample.xlsx"
dir_name = "/ExcelFileUser"
data=bucket.upload_file(real_file_path,file_name_inBucket,dir_name)
query=bucket.query_folder(dir_name)
print(data)
print(query)
return
官方文档更新了。文件路径什么的已经不对了。
直接登录会提示 类似这样的:
You do not have permission to get URL '/files/v2/1253424161/test//test.png' from this server.
现在的文档类似这样:
https://cloud.tencent.com/document/product/436/14690
不是标准的那种URL 好像就直接下载不了了
URL http://www.abc.com/1.txt 这样的是可以得
但是如果是
URL http://proxy-rar2.aaa.com/00/90/76/72/592a82cb3c988.zip?st=oMKU8VvHox79IcpfQcOLuQ&e=1496737341
就下载不了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.