Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 读取obs数据 #12

Open
shen865069799 opened this issue Sep 8, 2021 · 1 comment
Open

python 读取obs数据 #12

shen865069799 opened this issue Sep 8, 2021 · 1 comment

Comments

@shen865069799
Copy link

你好,我想问下python sdk可以读取obs里面的数据吗?
我在obs上的某个桶内存了一些图像的标注文件(xml文件),我用data+创建工作流,自定义函数,让obs去触发执行自定义函数,我想在自定义函数里面读取这些xml里面的内容,不知道怎么读取,我看了下官网的sdk( https://support.huaweicloud.com/sdk-python-devg-obs/obs_22_0100.html )有提供这个函数ObsClient.getObjectMetadata(bucketName, objectKey, versionId, sseHeader, origin, requestHeaders)但是它返回的都是属性信息,比如字节数,数据长度,拿不到文件里面的内容,所以想请教下您,我该如何获取obs文件里面存储的内容.

@mpb159753
Copy link

调用的接口错了,要用 getobject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants