【发布时间】:2019-03-29 10:24:01
【问题描述】:
我正在尝试列出一堆具有特定名称类型的 azure 容器 - 它们都称为cycling-asset-group-x,其中 x 是数字或字母,例如循环资产组a,循环资产组1,循环资产组b,循环资产组2。
我只想打印带有 number 后缀的容器,即cycling-asset-group-1、cycling-asset-group-2等
我该怎么做?到目前为止,这是我的目标:
account_name = 'name'
account_key = 'key'
# connect to the storage account
blob_service = BaseBlobService(account_name = account_name, account_key = account_key)
prefix_input_container = 'cycling-asset-group-'
# get a list of the containers - I think it's something like this...?
cycling_containers = blob_service.list_containers("%s%d" % (prefix_input_container,...))
for c in cycling_containers:
contname = c.name
print(contname)
【问题讨论】:
标签: python azure azure-blob-storage