Add read method to StorageStreamDownloader#24275
Conversation
|
API change check for API changes have been detected in API changes + def read(self, size: Optional[int] = -1) -> Union[bytes, str]
+ |
|
Hi @jalauzon-msft. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Please don't close this bot, I'll be getting back to this work soon. |
read method to SorageStreamDownloaderread method to StorageStreamDownloader
|
API change check APIView has identified API level changes in this PR and created following API reviews. azure-storage-blob |
vincenttran-msft
left a comment
There was a problem hiding this comment.
LGTM! Great work, this method looks quite hairy with that parallel stuff 😨
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py
Show resolved
Hide resolved
|
/azp run python - storage - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
annatisch
left a comment
There was a problem hiding this comment.
I think this is looking really good - thanks so much for this!!
sdk/storage/azure-storage-blob/azure/storage/blob/_shared/uploads_async.py
Show resolved
Hide resolved
sdk/storage/azure-storage-blob/azure/storage/blob/aio/_download_async.py
Outdated
Show resolved
Hide resolved
|
/azp run python - storage - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This change adds a standard
read(size=-1)method to theStorageStreamDownloaderclass to make it more like a Python stream. This method acts as one would expect, accepting a size to read and keeping track of a read offset internally. For now, the stream is non-seekable and forward reading only but I don't think there is anything preventing us from making this seekable in the future if desired. It will use an existing_ChunkDownloaderto download chunks as needed based on the read size.This change also adds support for async streams (classes with an async
readmethod) to asyncupload_blob. This was needed to support usingStorageStreamDownloaderas an input toupload_blob.