Python Blob存储:连接到emulator,本地开发失败
我正在为我的项目使用Azure功能。 我需要连接到blob存储并上载一些文件 就目前而言,一切都运转良好。但是我试图使用emulator存储来完成一个完整的本地开发(),问题来了 正如所解释的,我下载模拟器,运行它,这里一切都很好,我可以在Azure Storage Explorer中看到我的模拟器。我在local.settings.json中将“AzureWebJobsStorage”连接字符串更改为快捷方式“UseDevelopmentStorage=true” 当我运行代码时,问题出现在这一行:Python Blob存储:连接到emulator,本地开发失败,python,connection-string,azure-storage-blobs,azure-storage-emulator,Python,Connection String,Azure Storage Blobs,Azure Storage Emulator,我正在为我的项目使用Azure功能。 我需要连接到blob存储并上载一些文件 就目前而言,一切都运转良好。但是我试图使用emulator存储来完成一个完整的本地开发(),问题来了 正如所解释的,我下载模拟器,运行它,这里一切都很好,我可以在Azure Storage Explorer中看到我的模拟器。我在local.settings.json中将“AzureWebJobsStorage”连接字符串更改为快捷方式“UseDevelopmentStorage=true” 当我运行代码时,问题出现在这
container_client = ContainerClient.from_connection_string(
conn_str=conn_str,
container_name=container_name
)
康努街在哪
conn_str = os.get_env_variable('AzureWebJobsStorage')
在初始化过程中,我正在打印此连接字符串,结果是:
ConnectionString to blob storage : UseDevelopmentStorage=true
看来python不懂捷径,你知道我做错了什么吗?
感谢新SDK似乎还不支持Storage Emulator
UseDevelopmentStorage=true代码>连接字符串
同时,请使用完整连接字符串:
container\u client=ContainerClient.from\u connection\u string(“DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=eby8vdm02xnocqflquwjpllmetlcdxj1ouzft50usrz6ifsufquvercz4i6tq/K1SZFPTOtr/kbhbeksogmgmgw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;“,“foo”)
以下是我为实现此支持而创建的开放问题:
您收到的错误消息是什么。请编辑您的问题并将其包括在内。