我想用python將數據流式傳輸到azure塊blob。下面的代碼創建了blob,但以零字節結束。我該如何做這項工作?如何在python中將數據流式傳輸到azure塊blob
import io
import struct
from azure.storage.blob import BlockBlobService
storage = BlockBlobService('acct-xxx', 'key-xxx')
stream = io.BytesIO()
storage.create_blob_from_stream("mycontainer", "myblob", stream)
stream.write(struct.pack("d", 12.34))
stream.write(struct.pack("d", 56.78))
stream.close()
嗨,Greg。任何進展? –
我不認爲python庫會滿足我的需求。 –