azure-storage-blob 12.20.0b1__py3-none-any.whl → 12.21.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.
Files changed (50) hide show
  1. azure/storage/blob/__init__.py +12 -2
  2. azure/storage/blob/_blob_client.py +64 -51
  3. azure/storage/blob/_blob_service_client.py +17 -12
  4. azure/storage/blob/_container_client.py +33 -23
  5. azure/storage/blob/_download.py +277 -167
  6. azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
  7. azure/storage/blob/_generated/_configuration.py +2 -2
  8. azure/storage/blob/_generated/_patch.py +2 -0
  9. azure/storage/blob/_generated/_serialization.py +1 -1
  10. azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
  11. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  12. azure/storage/blob/_generated/aio/_patch.py +2 -0
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +10 -5
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +45 -26
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +12 -7
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +39 -20
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +15 -10
  18. azure/storage/blob/_generated/aio/operations/_patch.py +3 -0
  19. azure/storage/blob/_generated/aio/operations/_service_operations.py +28 -10
  20. azure/storage/blob/_generated/models/_patch.py +3 -0
  21. azure/storage/blob/_generated/operations/_append_blob_operations.py +14 -9
  22. azure/storage/blob/_generated/operations/_blob_operations.py +76 -51
  23. azure/storage/blob/_generated/operations/_block_blob_operations.py +18 -13
  24. azure/storage/blob/_generated/operations/_container_operations.py +64 -39
  25. azure/storage/blob/_generated/operations/_page_blob_operations.py +24 -19
  26. azure/storage/blob/_generated/operations/_patch.py +3 -0
  27. azure/storage/blob/_generated/operations/_service_operations.py +43 -19
  28. azure/storage/blob/_generated/py.typed +1 -0
  29. azure/storage/blob/_lease.py +6 -5
  30. azure/storage/blob/_models.py +1 -1
  31. azure/storage/blob/_serialize.py +1 -0
  32. azure/storage/blob/_shared/authentication.py +62 -4
  33. azure/storage/blob/_shared/base_client.py +1 -1
  34. azure/storage/blob/_shared/base_client_async.py +3 -2
  35. azure/storage/blob/_shared/models.py +13 -12
  36. azure/storage/blob/_shared/shared_access_signature.py +1 -0
  37. azure/storage/blob/_shared_access_signature.py +1 -0
  38. azure/storage/blob/_version.py +1 -1
  39. azure/storage/blob/aio/__init__.py +13 -4
  40. azure/storage/blob/aio/_blob_client_async.py +50 -47
  41. azure/storage/blob/aio/_blob_service_client_async.py +11 -11
  42. azure/storage/blob/aio/_container_client_async.py +23 -20
  43. azure/storage/blob/aio/_download_async.py +317 -209
  44. azure/storage/blob/aio/_lease_async.py +6 -6
  45. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/METADATA +2 -2
  46. azure_storage_blob-12.21.0.dist-info/RECORD +82 -0
  47. azure_storage_blob-12.20.0b1.dist-info/RECORD +0 -81
  48. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/LICENSE +0 -0
  49. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/WHEEL +0 -0
  50. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
- # pylint: disable=too-many-lines
2
1
  # -------------------------------------------------------------------------
3
2
  # Copyright (c) Microsoft Corporation. All rights reserved.
4
3
  # Licensed under the MIT License. See License.txt in the project root for
5
4
  # license information.
6
5
  # --------------------------------------------------------------------------
6
+ # pylint: disable=too-many-lines, docstring-keyword-should-match-keyword-only
7
7
 
8
8
  import functools
9
9
  import warnings
@@ -84,7 +84,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
84
84
 
85
85
  For more optional configuration, please click
86
86
  `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
87
- #optional-configuration>`_.
87
+ #optional-configuration>`__.
88
88
 
89
89
  :param str account_url:
90
90
  The URI to the storage account. In order to create a client given the full URI to the container,
@@ -202,7 +202,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
202
202
  - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
203
203
  If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
204
204
  should be the storage account key.
205
- :type credential: Optional[Union[str, Dict[str, str], "AzureNamedKeyCredential", "AzureSasCredential", "TokenCredential"]] = None, # pylint: disable=line-too-long
205
+ :type credential:
206
+ ~azure.core.credentials.AzureNamedKeyCredential or
207
+ ~azure.core.credentials.AzureSasCredential or
208
+ ~azure.core.credentials.TokenCredential or
209
+ str or dict[str, str] or None
206
210
  :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
207
211
  authentication. Only has an effect when credential is of type TokenCredential. The value could be
208
212
  https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
@@ -251,7 +255,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
251
255
  Credentials provided here will take precedence over those in the connection string.
252
256
  If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
253
257
  should be the storage account key.
254
- :type credential: Optional[Union[str, Dict[str, str], "AzureNamedKeyCredential", "AzureSasCredential", "TokenCredential"]] = None, # pylint: disable=line-too-long
258
+ :type credential:
259
+ ~azure.core.credentials.AzureNamedKeyCredential or
260
+ ~azure.core.credentials.AzureSasCredential or
261
+ ~azure.core.credentials.TokenCredential or
262
+ str or dict[str, str] or None
255
263
  :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
256
264
  authentication. Only has an effect when credential is of type TokenCredential. The value could be
257
265
  https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
@@ -298,7 +306,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
298
306
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
299
307
  This value is not tracked or validated on the client. To configure client-side network timesouts
300
308
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
301
- #other-client--per-operation-configuration>`_.
309
+ #other-client--per-operation-configuration>`__.
302
310
  :returns: A dictionary of response headers.
303
311
  :rtype: Dict[str, Union[str, datetime]]
304
312
 
@@ -344,7 +352,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
344
352
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
345
353
  This value is not tracked or validated on the client. To configure client-side network timesouts
346
354
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
347
- #other-client--per-operation-configuration>`_.
355
+ #other-client--per-operation-configuration>`__.
348
356
  :returns: The renamed container client.
349
357
  :rtype: ~azure.storage.blob.ContainerClient
350
358
  """
@@ -400,7 +408,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
400
408
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
401
409
  This value is not tracked or validated on the client. To configure client-side network timesouts
402
410
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
403
- #other-client--per-operation-configuration>`_.
411
+ #other-client--per-operation-configuration>`__.
404
412
  :rtype: None
405
413
 
406
414
  .. admonition:: Example:
@@ -466,7 +474,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
466
474
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
467
475
  This value is not tracked or validated on the client. To configure client-side network timesouts
468
476
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
469
- #other-client--per-operation-configuration>`_.
477
+ #other-client--per-operation-configuration>`__.
470
478
  :returns: A BlobLeaseClient object, that can be run in a context manager.
471
479
  :rtype: ~azure.storage.blob.BlobLeaseClient
472
480
 
@@ -516,7 +524,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
516
524
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
517
525
  This value is not tracked or validated on the client. To configure client-side network timesouts
518
526
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
519
- #other-client--per-operation-configuration>`_.
527
+ #other-client--per-operation-configuration>`__.
520
528
  :return: Properties for the specified container within a container object.
521
529
  :rtype: ~azure.storage.blob.ContainerProperties
522
530
 
@@ -554,7 +562,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
554
562
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
555
563
  This value is not tracked or validated on the client. To configure client-side network timesouts
556
564
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
557
- #other-client--per-operation-configuration>`_.
565
+ #other-client--per-operation-configuration>`__.
558
566
  :returns: boolean
559
567
  :rtype: bool
560
568
  """
@@ -606,7 +614,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
606
614
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
607
615
  This value is not tracked or validated on the client. To configure client-side network timesouts
608
616
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
609
- #other-client--per-operation-configuration>`_.
617
+ #other-client--per-operation-configuration>`__.
610
618
  :returns: Container-updated property dict (Etag and last modified).
611
619
  :rtype: dict[str, str or datetime]
612
620
 
@@ -685,7 +693,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
685
693
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
686
694
  This value is not tracked or validated on the client. To configure client-side network timesouts
687
695
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
688
- #other-client--per-operation-configuration>`_.
696
+ #other-client--per-operation-configuration>`__.
689
697
  :returns: Access policy information in a dict.
690
698
  :rtype: dict[str, Any]
691
699
 
@@ -752,7 +760,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
752
760
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
753
761
  This value is not tracked or validated on the client. To configure client-side network timesouts
754
762
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
755
- #other-client--per-operation-configuration>`_.
763
+ #other-client--per-operation-configuration>`__.
756
764
  :returns: Container-updated property dict (Etag and last modified).
757
765
  :rtype: dict[str, str or ~datetime.datetime]
758
766
 
@@ -815,7 +823,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
815
823
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
816
824
  This value is not tracked or validated on the client. To configure client-side network timesouts
817
825
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
818
- #other-client--per-operation-configuration>`_.
826
+ #other-client--per-operation-configuration>`__.
819
827
  :returns: An iterable (auto-paging) response of BlobProperties.
820
828
  :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
821
829
 
@@ -864,7 +872,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
864
872
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
865
873
  This value is not tracked or validated on the client. To configure client-side network timesouts
866
874
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
867
- #other-client--per-operation-configuration>`_.
875
+ #other-client--per-operation-configuration>`__.
868
876
  :returns: An iterable (auto-paging) response of blob names as strings.
869
877
  :rtype: ~azure.core.paging.ItemPaged[str]
870
878
  """
@@ -921,7 +929,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
921
929
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
922
930
  This value is not tracked or validated on the client. To configure client-side network timesouts
923
931
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
924
- #other-client--per-operation-configuration>`_.
932
+ #other-client--per-operation-configuration>`__.
925
933
  :returns: An iterable (auto-paging) response of BlobProperties.
926
934
  :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
927
935
  """
@@ -967,7 +975,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
967
975
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
968
976
  This value is not tracked or validated on the client. To configure client-side network timesouts
969
977
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
970
- #other-client--per-operation-configuration>`_.
978
+ #other-client--per-operation-configuration>`__.
971
979
  :returns: An iterable (auto-paging) response of FilteredBlob.
972
980
  :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
973
981
  """
@@ -1054,7 +1062,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1054
1062
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1055
1063
  This value is not tracked or validated on the client. To configure client-side network timesouts
1056
1064
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1057
- #other-client--per-operation-configuration>`_. This method may make multiple calls to the service and
1065
+ #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
1058
1066
  the timeout will apply to each call individually.
1059
1067
  :keyword ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
1060
1068
  A page blob tier value to set the blob to. The tier correlates to the size of the
@@ -1155,6 +1163,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1155
1163
  value that, when present, specifies the version of the blob to delete.
1156
1164
 
1157
1165
  .. versionadded:: 12.4.0
1166
+
1158
1167
  This keyword argument was introduced in API version '2019-12-12'.
1159
1168
 
1160
1169
  :keyword lease:
@@ -1189,7 +1198,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1189
1198
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1190
1199
  This value is not tracked or validated on the client. To configure client-side network timesouts
1191
1200
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1192
- #other-client--per-operation-configuration>`_.
1201
+ #other-client--per-operation-configuration>`__.
1193
1202
  :rtype: None
1194
1203
  """
1195
1204
  if isinstance(blob, BlobProperties):
@@ -1253,6 +1262,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1253
1262
  value that, when present, specifies the version of the blob to download.
1254
1263
 
1255
1264
  .. versionadded:: 12.4.0
1265
+
1256
1266
  This keyword argument was introduced in API version '2019-12-12'.
1257
1267
 
1258
1268
  :keyword bool validate_content:
@@ -1311,7 +1321,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1311
1321
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1312
1322
  This value is not tracked or validated on the client. To configure client-side network timesouts
1313
1323
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1314
- #other-client--per-operation-configuration>`_. This method may make multiple calls to the service and
1324
+ #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
1315
1325
  the timeout will apply to each call individually.
1316
1326
  multiple calls to the Azure service and the timeout will apply to
1317
1327
  each call individually.
@@ -1530,7 +1540,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1530
1540
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1531
1541
  This value is not tracked or validated on the client. To configure client-side network timesouts
1532
1542
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1533
- #other-client--per-operation-configuration>`_.
1543
+ #other-client--per-operation-configuration>`__.
1534
1544
  :return: An iterator of responses, one for each blob in order
1535
1545
  :rtype: Iterator[~azure.core.pipeline.transport.HttpResponse]
1536
1546
 
@@ -1700,7 +1710,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1700
1710
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1701
1711
  This value is not tracked or validated on the client. To configure client-side network timesouts
1702
1712
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1703
- #other-client--per-operation-configuration>`_.
1713
+ #other-client--per-operation-configuration>`__.
1704
1714
  :keyword bool raise_on_any_failure:
1705
1715
  This is a boolean param which defaults to True. When this is set, an exception
1706
1716
  is raised even if there is a single operation failure.
@@ -1753,7 +1763,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
1753
1763
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
1754
1764
  This value is not tracked or validated on the client. To configure client-side network timesouts
1755
1765
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1756
- #other-client--per-operation-configuration>`_.
1766
+ #other-client--per-operation-configuration>`__.
1757
1767
  :keyword bool raise_on_any_failure:
1758
1768
  This is a boolean param which defaults to True. When this is set, an exception
1759
1769
  is raised even if there is a single operation failure.