繁体   English   中英

如何使用 python 中的 DataLakeServiceClient 获取 Azure 中存在的容器列表

[英]How to get list of Containers present in Azure using DataLakeServiceClient in python

从 azure.storage.filedatalake 导入 DataLakeServiceClient service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format("https", storage_account_name), credential=storage_account_key) 容器 = service_client.list_containers () 用于容器中的 c:打印 (c.name)

但我收到这样的错误: AttributeError: 'DataLakeServiceClient' object has no attribute 'list_containers'

service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format("https", storage_account_name), credential=storage_account_key) containers = service_client.list_file_systems() for c in containers: print (c.name)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM