检查blob是否在python azure中存在

拉斐尔

由于azure-storage-blob的新更新,blockblobservice已弃用

如何检查斑点是否存在?

这个答案不适用于新版本的Azure-storage-blob使用python进行更快的Azure blob名称搜索吗?

我在GitHub上发现了这个问题:https : //github.com/Azure/azure-sdk-for-python/issues/12744

克里希格

2020-09-10发布的12.5.0版本现在已exists在新的SDK中使用了方法。

例如,

同步:

from azure.storage.blob import BlobClient

blob = BlobClient.from_connection_string(conn_str="my_connection_string", container_name="mycontainer", blob_name="myblob")
exists = blob.exists()
print(exists)

异步:

import asyncio

async def check():
    from azure.storage.blob.aio import BlobClient
    blob = BlobClient.from_connection_string(conn_str="my_connection_string", container_name="mycontainer", blob_name="myblob")
    async with blob:
        exists = await blob.exists()
        print(exists)

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

检查Azure中是否存在Blob

来自分类Dev

检查azure blob容器中是否存在文件

来自分类Dev

如何使用PowerShell检查Azure Blob容器中是否已存在Blob

来自分类Dev

在Azure函数中使用Python根据Azure Blob存储中的模式匹配检查Blob的存在

来自分类Dev

检查块Blob是否存在

来自分类Dev

检查块Blob是否存在

来自分类Dev

如何检查Azure Blob存储V12中是否存在容器

来自分类Dev

c# Azure MVC 检查控制器中是否存在 blob

来自分类Dev

检查Python列表中是否存在密钥

来自分类Dev

如何检查python中是否存在值

来自分类Dev

在Python中检查URL是否存在

来自分类Dev

检查Python模块中的类型是否存在

来自分类Dev

检查Python 2.7中是否存在文件

来自分类Dev

如何检查python中是否存在文件?

来自分类Dev

如何检查我的帐户中是否存在Azure经典订阅

来自分类Dev

检查Azure表存储中是否存在实体

来自分类Dev

检查属性是否存在并且在Python中是否正确

来自分类Dev

检查列表中是否存在

来自分类Dev

检查数组中是否存在

来自分类Dev

检查列表中是否存在

来自分类Dev

检查Python Flask中是否存在帖子值

来自分类Dev

如何检查Python中是否存在静态变量?

来自分类Dev

检查Python字典中是否存在键/值对

来自分类Dev

检查Python中是否存在对象ID

来自分类Dev

Python:检查生成器中是否存在对象

来自分类Dev

在检查Python列表中的元素是否存在时循环

来自分类Dev

如何检查列表中是否存在提供的数字范围?-Python

来自分类Dev

Python:检查给定目录中是否存在任何文件

来自分类Dev

检查CSV是否在Python中存在相似的值