azure-storage-blob 12.25.1__py3-none-any.whl → 12.26.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/storage/blob/__init__.py +3 -2
- azure/storage/blob/_blob_client.py +94 -41
- azure/storage/blob/_blob_client_helpers.py +19 -4
- azure/storage/blob/_blob_service_client.py +16 -13
- azure/storage/blob/_container_client.py +25 -22
- azure/storage/blob/_deserialize.py +1 -1
- azure/storage/blob/_download.py +7 -7
- azure/storage/blob/_encryption.py +177 -184
- azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
- azure/storage/blob/_generated/_configuration.py +2 -2
- azure/storage/blob/_generated/_serialization.py +3 -3
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
- azure/storage/blob/_generated/aio/_configuration.py +2 -2
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +5 -4
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +5 -25
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +9 -7
- azure/storage/blob/_generated/aio/operations/_container_operations.py +1 -19
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +5 -10
- azure/storage/blob/_generated/aio/operations/_service_operations.py +1 -8
- azure/storage/blob/_generated/models/__init__.py +2 -0
- azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +6 -0
- azure/storage/blob/_generated/operations/_append_blob_operations.py +12 -9
- azure/storage/blob/_generated/operations/_blob_operations.py +32 -49
- azure/storage/blob/_generated/operations/_block_blob_operations.py +21 -13
- azure/storage/blob/_generated/operations/_container_operations.py +19 -37
- azure/storage/blob/_generated/operations/_page_blob_operations.py +17 -19
- azure/storage/blob/_generated/operations/_service_operations.py +9 -17
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_quick_query_helper.py +20 -24
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/__init__.py +7 -7
- azure/storage/blob/_shared/authentication.py +49 -32
- azure/storage/blob/_shared/avro/avro_io.py +44 -42
- azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
- azure/storage/blob/_shared/avro/datafile.py +24 -21
- azure/storage/blob/_shared/avro/datafile_async.py +15 -15
- azure/storage/blob/_shared/avro/schema.py +196 -217
- azure/storage/blob/_shared/base_client.py +82 -59
- azure/storage/blob/_shared/base_client_async.py +58 -51
- azure/storage/blob/_shared/constants.py +1 -1
- azure/storage/blob/_shared/models.py +93 -92
- azure/storage/blob/_shared/parser.py +3 -3
- azure/storage/blob/_shared/policies.py +176 -145
- azure/storage/blob/_shared/policies_async.py +58 -69
- azure/storage/blob/_shared/request_handlers.py +50 -45
- azure/storage/blob/_shared/response_handlers.py +49 -45
- azure/storage/blob/_shared/shared_access_signature.py +67 -71
- azure/storage/blob/_shared/uploads.py +56 -49
- azure/storage/blob/_shared/uploads_async.py +70 -58
- azure/storage/blob/_shared_access_signature.py +3 -1
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +3 -2
- azure/storage/blob/aio/_blob_client_async.py +241 -44
- azure/storage/blob/aio/_blob_service_client_async.py +13 -11
- azure/storage/blob/aio/_container_client_async.py +28 -25
- azure/storage/blob/aio/_download_async.py +15 -11
- azure/storage/blob/aio/_lease_async.py +1 -0
- azure/storage/blob/aio/_quick_query_helper_async.py +194 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.26.0.dist-info}/METADATA +1 -1
- azure_storage_blob-12.26.0.dist-info/RECORD +85 -0
- azure_storage_blob-12.25.1.dist-info/RECORD +0 -84
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.26.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.26.0.dist-info}/WHEEL +0 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.26.0.dist-info}/top_level.txt +0 -0
@@ -137,7 +137,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
137
137
|
|
138
138
|
:param str hostname:
|
139
139
|
The hostname of the current location mode.
|
140
|
-
:
|
140
|
+
:return: A formatted endpoint URL including current location mode hostname.
|
141
141
|
:rtype: str
|
142
142
|
"""
|
143
143
|
return f"{self.scheme}://{hostname}/{self._query_str}"
|
@@ -169,7 +169,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
169
169
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
170
170
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
171
171
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
172
|
-
:
|
172
|
+
:return: A Blob service client.
|
173
173
|
:rtype: ~azure.storage.blob.BlobServiceClient
|
174
174
|
|
175
175
|
.. admonition:: Example:
|
@@ -206,7 +206,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
206
206
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
207
207
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
208
208
|
#other-client--per-operation-configuration>`__.
|
209
|
-
:
|
209
|
+
:return: The user delegation key.
|
210
210
|
:rtype: ~azure.storage.blob.UserDelegationKey
|
211
211
|
"""
|
212
212
|
key_info = KeyInfo(start=_to_utc_datetime(key_start_time), expiry=_to_utc_datetime(key_expiry_time))
|
@@ -227,7 +227,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
227
227
|
The information can also be retrieved if the user has a SAS to a container or blob.
|
228
228
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
229
229
|
|
230
|
-
:
|
230
|
+
:return: A dict of account information (SKU and account type).
|
231
231
|
:rtype: dict(str, str)
|
232
232
|
|
233
233
|
.. admonition:: Example:
|
@@ -270,7 +270,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
270
270
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
271
271
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
272
272
|
#other-client--per-operation-configuration>`__.
|
273
|
-
:
|
273
|
+
:return: The blob service stats.
|
274
274
|
:rtype: Dict[str, Any]
|
275
275
|
|
276
276
|
.. admonition:: Example:
|
@@ -301,7 +301,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
301
301
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
302
302
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
303
303
|
#other-client--per-operation-configuration>`__.
|
304
|
-
:
|
304
|
+
:return: An object containing blob service properties such as
|
305
305
|
analytics logging, hour/minute metrics, cors rules, etc.
|
306
306
|
:rtype: Dict[str, Any]
|
307
307
|
|
@@ -371,6 +371,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
371
371
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
372
372
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
373
373
|
#other-client--per-operation-configuration>`__.
|
374
|
+
:return: None
|
374
375
|
:rtype: None
|
375
376
|
|
376
377
|
.. admonition:: Example:
|
@@ -435,7 +436,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
435
436
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
436
437
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
437
438
|
#other-client--per-operation-configuration>`__.
|
438
|
-
:
|
439
|
+
:return: An iterable (auto-paging) of ContainerProperties.
|
439
440
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.ContainerProperties]
|
440
441
|
|
441
442
|
.. admonition:: Example:
|
@@ -489,7 +490,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
489
490
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
490
491
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
491
492
|
#other-client--per-operation-configuration>`__.
|
492
|
-
:
|
493
|
+
:return: An iterable (auto-paging) response of BlobProperties.
|
493
494
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.FilteredBlob]
|
494
495
|
"""
|
495
496
|
|
@@ -538,7 +539,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
538
539
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
539
540
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
540
541
|
#other-client--per-operation-configuration>`__.
|
541
|
-
:
|
542
|
+
:return: A container client to interact with the newly created container.
|
542
543
|
:rtype: ~azure.storage.blob.ContainerClient
|
543
544
|
|
544
545
|
.. admonition:: Example:
|
@@ -600,6 +601,8 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
600
601
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
601
602
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
602
603
|
#other-client--per-operation-configuration>`__.
|
604
|
+
:return: None
|
605
|
+
:rtype: None
|
603
606
|
|
604
607
|
.. admonition:: Example:
|
605
608
|
|
@@ -638,7 +641,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
638
641
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
639
642
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
640
643
|
#other-client--per-operation-configuration>`__.
|
641
|
-
:
|
644
|
+
:return: A container client for the renamed container.
|
642
645
|
:rtype: ~azure.storage.blob.ContainerClient
|
643
646
|
"""
|
644
647
|
renamed_container = self.get_container_client(new_name)
|
@@ -677,7 +680,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
677
680
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
678
681
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
679
682
|
#other-client--per-operation-configuration>`__.
|
680
|
-
:
|
683
|
+
:return: The undeleted ContainerClient.
|
681
684
|
:rtype: ~azure.storage.blob.ContainerClient
|
682
685
|
"""
|
683
686
|
new_name = kwargs.pop('new_name', None)
|
@@ -701,7 +704,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
701
704
|
The container. This can either be the name of the container,
|
702
705
|
or an instance of ContainerProperties.
|
703
706
|
:type container: str or ~azure.storage.blob.ContainerProperties
|
704
|
-
:
|
707
|
+
:return: A ContainerClient.
|
705
708
|
:rtype: ~azure.storage.blob.ContainerClient
|
706
709
|
|
707
710
|
.. admonition:: Example:
|
@@ -750,7 +753,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
750
753
|
:type snapshot: str or dict(str, Any)
|
751
754
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
752
755
|
specifies the version of the blob to operate on.
|
753
|
-
:
|
756
|
+
:return: A BlobClient.
|
754
757
|
:rtype: ~azure.storage.blob.BlobClient
|
755
758
|
|
756
759
|
.. admonition:: Example:
|
@@ -193,7 +193,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
193
193
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
194
194
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
195
195
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
196
|
-
:
|
196
|
+
:return: A container client.
|
197
197
|
:rtype: ~azure.storage.blob.ContainerClient
|
198
198
|
"""
|
199
199
|
try:
|
@@ -246,7 +246,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
246
246
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
247
247
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
248
248
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
249
|
-
:
|
249
|
+
:return: A container client.
|
250
250
|
:rtype: ~azure.storage.blob.ContainerClient
|
251
251
|
|
252
252
|
.. admonition:: Example:
|
@@ -293,7 +293,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
293
293
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
294
294
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
295
295
|
#other-client--per-operation-configuration>`__.
|
296
|
-
:
|
296
|
+
:return: A dictionary of response headers.
|
297
297
|
:rtype: Dict[str, Union[str, datetime]]
|
298
298
|
|
299
299
|
.. admonition:: Example:
|
@@ -338,7 +338,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
338
338
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
339
339
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
340
340
|
#other-client--per-operation-configuration>`__.
|
341
|
-
:
|
341
|
+
:return: The renamed container client.
|
342
342
|
:rtype: ~azure.storage.blob.ContainerClient
|
343
343
|
"""
|
344
344
|
lease = kwargs.pop('lease', None)
|
@@ -392,6 +392,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
392
392
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
393
393
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
394
394
|
#other-client--per-operation-configuration>`__.
|
395
|
+
:return: None
|
395
396
|
:rtype: None
|
396
397
|
|
397
398
|
.. admonition:: Example:
|
@@ -458,7 +459,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
458
459
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
459
460
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
460
461
|
#other-client--per-operation-configuration>`__.
|
461
|
-
:
|
462
|
+
:return: A BlobLeaseClient object, that can be run in a context manager.
|
462
463
|
:rtype: ~azure.storage.blob.BlobLeaseClient
|
463
464
|
|
464
465
|
.. admonition:: Example:
|
@@ -483,7 +484,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
483
484
|
The information can also be retrieved if the user has a SAS to a container or blob.
|
484
485
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
485
486
|
|
486
|
-
:
|
487
|
+
:return: A dict of account information (SKU and account type).
|
487
488
|
:rtype: dict(str, str)
|
488
489
|
"""
|
489
490
|
try:
|
@@ -543,7 +544,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
543
544
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
544
545
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
545
546
|
#other-client--per-operation-configuration>`__.
|
546
|
-
:
|
547
|
+
:return: boolean
|
547
548
|
:rtype: bool
|
548
549
|
"""
|
549
550
|
try:
|
@@ -594,7 +595,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
594
595
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
595
596
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
596
597
|
#other-client--per-operation-configuration>`__.
|
597
|
-
:
|
598
|
+
:return: Container-updated property dict (Etag and last modified).
|
598
599
|
:rtype: dict[str, str or datetime]
|
599
600
|
|
600
601
|
.. admonition:: Example:
|
@@ -629,7 +630,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
629
630
|
|
630
631
|
Defaults to current container's credentials.
|
631
632
|
|
632
|
-
:
|
633
|
+
:return: A BlobServiceClient.
|
633
634
|
:rtype: ~azure.storage.blob.BlobServiceClient
|
634
635
|
|
635
636
|
.. admonition:: Example:
|
@@ -671,7 +672,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
671
672
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
672
673
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
673
674
|
#other-client--per-operation-configuration>`__.
|
674
|
-
:
|
675
|
+
:return: Access policy information in a dict.
|
675
676
|
:rtype: dict[str, Any]
|
676
677
|
|
677
678
|
.. admonition:: Example:
|
@@ -738,7 +739,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
738
739
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
739
740
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
740
741
|
#other-client--per-operation-configuration>`__.
|
741
|
-
:
|
742
|
+
:return: Container-updated property dict (Etag and last modified).
|
742
743
|
:rtype: dict[str, str or ~datetime.datetime]
|
743
744
|
|
744
745
|
.. admonition:: Example:
|
@@ -801,7 +802,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
801
802
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
802
803
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
803
804
|
#other-client--per-operation-configuration>`__.
|
804
|
-
:
|
805
|
+
:return: An iterable (auto-paging) response of BlobProperties.
|
805
806
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
806
807
|
|
807
808
|
.. admonition:: Example:
|
@@ -850,7 +851,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
850
851
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
851
852
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
852
853
|
#other-client--per-operation-configuration>`__.
|
853
|
-
:
|
854
|
+
:return: An iterable (auto-paging) response of blob names as strings.
|
854
855
|
:rtype: ~azure.core.paging.ItemPaged[str]
|
855
856
|
"""
|
856
857
|
if kwargs.pop('prefix', None):
|
@@ -883,7 +884,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
883
884
|
include: Optional[Union[List[str], str]] = None,
|
884
885
|
delimiter: str = "/",
|
885
886
|
**kwargs: Any
|
886
|
-
) -> ItemPaged[BlobProperties]:
|
887
|
+
) -> ItemPaged[Union[BlobProperties, BlobPrefix]]:
|
887
888
|
"""Returns a generator to list the blobs under the specified container.
|
888
889
|
The generator will lazily follow the continuation tokens returned by
|
889
890
|
the service. This operation will list blobs in accordance with a hierarchy,
|
@@ -908,8 +909,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
908
909
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
909
910
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
910
911
|
#other-client--per-operation-configuration>`__.
|
911
|
-
:
|
912
|
-
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
912
|
+
:return: An iterable (auto-paging) response of BlobProperties or BlobPrefix.
|
913
|
+
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties or ~azure.storage.blob.BlobPrefix]
|
913
914
|
"""
|
914
915
|
if kwargs.pop('prefix', None):
|
915
916
|
raise ValueError("Passing 'prefix' has no effect on filtering, " +
|
@@ -954,7 +955,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
954
955
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
955
956
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
956
957
|
#other-client--per-operation-configuration>`__.
|
957
|
-
:
|
958
|
+
:return: An iterable (auto-paging) response of FilteredBlob.
|
958
959
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
959
960
|
"""
|
960
961
|
results_per_page = kwargs.pop('results_per_page', None)
|
@@ -1078,7 +1079,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1078
1079
|
function(current: int, total: Optional[int]) where current is the number of bytes transferred
|
1079
1080
|
so far, and total is the size of the blob or None if the size is unknown.
|
1080
1081
|
:paramtype progress_hook: Callable[[int, Optional[int]], None]
|
1081
|
-
:
|
1082
|
+
:return: A BlobClient to interact with the newly uploaded blob.
|
1082
1083
|
:rtype: ~azure.storage.blob.BlobClient
|
1083
1084
|
|
1084
1085
|
.. admonition:: Example:
|
@@ -1128,7 +1129,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1128
1129
|
and retains the blob or snapshot for specified number of days.
|
1129
1130
|
After specified number of days, blob's data is removed from the service during garbage collection.
|
1130
1131
|
Soft deleted blob or snapshot is accessible through :func:`list_blobs()` specifying `include=["deleted"]`
|
1131
|
-
option. Soft-deleted blob or snapshot can be restored using
|
1132
|
+
option. Soft-deleted blob or snapshot can be restored using
|
1133
|
+
:func:`~azure.storage.blob.BlobClient.undelete_blob()`
|
1132
1134
|
|
1133
1135
|
:param str blob: The blob with which to interact.
|
1134
1136
|
:param str delete_snapshots:
|
@@ -1176,6 +1178,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1176
1178
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1177
1179
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1178
1180
|
#other-client--per-operation-configuration>`__.
|
1181
|
+
:return: None
|
1179
1182
|
:rtype: None
|
1180
1183
|
"""
|
1181
1184
|
if isinstance(blob, BlobProperties):
|
@@ -1302,7 +1305,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1302
1305
|
the timeout will apply to each call individually.
|
1303
1306
|
multiple calls to the Azure service and the timeout will apply to
|
1304
1307
|
each call individually.
|
1305
|
-
:
|
1308
|
+
:return: A streaming object (StorageStreamDownloader)
|
1306
1309
|
:rtype: ~azure.storage.blob.StorageStreamDownloader
|
1307
1310
|
"""
|
1308
1311
|
if isinstance(blob, BlobProperties):
|
@@ -1334,7 +1337,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1334
1337
|
and retains the blobs or snapshots for specified number of days.
|
1335
1338
|
After specified number of days, blobs' data is removed from the service during garbage collection.
|
1336
1339
|
Soft deleted blobs or snapshots are accessible through :func:`list_blobs()` specifying `include=["deleted"]`
|
1337
|
-
Soft-deleted blobs or snapshots can be restored using :func:`~azure.storage.blob.BlobClient.
|
1340
|
+
Soft-deleted blobs or snapshots can be restored using :func:`~azure.storage.blob.BlobClient.undelete_blob()`
|
1338
1341
|
|
1339
1342
|
The maximum number of blobs that can be deleted in a single request is 256.
|
1340
1343
|
|
@@ -1586,7 +1589,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1586
1589
|
or the response returned from :func:`~BlobClient.create_snapshot()`.
|
1587
1590
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
1588
1591
|
specifies the version of the blob to operate on.
|
1589
|
-
:
|
1592
|
+
:return: A BlobClient.
|
1590
1593
|
:rtype: ~azure.storage.blob.BlobClient
|
1591
1594
|
|
1592
1595
|
.. admonition:: Example:
|
@@ -194,7 +194,7 @@ def parse_tags(generated_tags: Optional["BlobTags"]) -> Optional[Dict[str, str]]
|
|
194
194
|
|
195
195
|
:param Optional[BlobTags] generated_tags:
|
196
196
|
A list containing the BlobTag objects from generated code.
|
197
|
-
:
|
197
|
+
:return: A dictionary of the BlobTag objects.
|
198
198
|
:rtype: Optional[Dict[str, str]]
|
199
199
|
"""
|
200
200
|
if generated_tags:
|
azure/storage/blob/_download.py
CHANGED
@@ -547,7 +547,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
547
547
|
|
548
548
|
NOTE: If the stream has been partially read, some data may be re-downloaded by the iterator.
|
549
549
|
|
550
|
-
:
|
550
|
+
:return: An iterator of the chunks in the download stream.
|
551
551
|
:rtype: Iterator[bytes]
|
552
552
|
|
553
553
|
.. admonition:: Example:
|
@@ -621,7 +621,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
621
621
|
The number of chars to download from the stream. Leave unspecified
|
622
622
|
or set negative to download all chars. Note, this can only be used
|
623
623
|
when encoding is specified on `download_blob`.
|
624
|
-
:
|
624
|
+
:return:
|
625
625
|
The requested data as bytes or a string if encoding was specified. If
|
626
626
|
the return value is empty, there is no more data to read.
|
627
627
|
:rtype: T
|
@@ -757,7 +757,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
757
757
|
Read the entire contents of this blob.
|
758
758
|
This operation is blocking until all data is downloaded.
|
759
759
|
|
760
|
-
:
|
760
|
+
:return: The requested data as bytes or a string if encoding was specified.
|
761
761
|
:rtype: T
|
762
762
|
"""
|
763
763
|
return self.read()
|
@@ -769,7 +769,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
769
769
|
The stream to download to. This can be an open file-handle,
|
770
770
|
or any writable stream. The stream must be seekable if the download
|
771
771
|
uses more than one parallel connection.
|
772
|
-
:
|
772
|
+
:return: The number of bytes read.
|
773
773
|
:rtype: int
|
774
774
|
"""
|
775
775
|
if self._text_mode:
|
@@ -866,7 +866,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
866
866
|
|
867
867
|
:param int max_concurrency:
|
868
868
|
The number of parallel connections with which to download.
|
869
|
-
:
|
869
|
+
:return: The contents of the file as bytes.
|
870
870
|
:rtype: bytes
|
871
871
|
"""
|
872
872
|
warnings.warn(
|
@@ -891,7 +891,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
891
891
|
The number of parallel connections with which to download.
|
892
892
|
:param str encoding:
|
893
893
|
Test encoding to decode the downloaded bytes. Default is UTF-8.
|
894
|
-
:
|
894
|
+
:return: The content of the file as a str.
|
895
895
|
:rtype: str
|
896
896
|
"""
|
897
897
|
warnings.warn(
|
@@ -917,7 +917,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
917
917
|
uses more than one parallel connection.
|
918
918
|
:param int max_concurrency:
|
919
919
|
The number of parallel connections with which to download.
|
920
|
-
:
|
920
|
+
:return: The properties of the downloaded blob.
|
921
921
|
:rtype: Any
|
922
922
|
"""
|
923
923
|
warnings.warn(
|