Azure / Azure/azure-storage-python
Large File Upload Max_Conncurrenct
- 主要语言
- Python
- 星标
- 343
- 派生
- 243
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
I am using the following code from one of the other posts in the the azure sdk and i keep seeing there is a Max_Concurrency or Max_Connections. I was wondering if it can be used in the code to allow more chunk uploads at the same time.
`import os
from azure.storage.blob import BlobServiceClient, BlobClient
from azure.storage.blob import ContentSettings, ContainerClient,BlobBlock
import uuid
# Instantiate a new BlobServiceClient using a connection string
blob_service_client = BlobServiceClient.from_connection_string("Conn String")
# Instantiate a new ContainerClient
container_client = blob_service_client.get_container_client('cctvvideo')
blob_client = container_client.get_blob_client(r"file.mp4")
# upload data
block_list=[]
chunk_size=4000000
with open(r'C:\Temp\file.mp4','rb') as f:
while True:
read_data = f.read(chunk_size)
if not read_data:
break # done
blk_id = str(uuid.uuid4())
blob_client.stage_block(block_id=blk_id,data=read_data)
block_list.append(BlobBlock(block_id=blk_id))
print (uuid.uuid4())
blob_client.commit_block_list(block_list)`
Thanks in advance.
贡献指南
调研方向
该 issue 未指定任何 repository 文件、测试或入口点,因此请先定位 Python blob 上传实现以及现有的并发选项。所请求的结果并不明确:作者询问是否支持并发上传 chunk,而不是指定代码更改或验收测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- cloud
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 15/100