azure-storage-blob 12.26.0b1__py3-none-any.whl → 12.27.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 (72) hide show
  1. azure/storage/blob/__init__.py +6 -5
  2. azure/storage/blob/_blob_client.py +59 -38
  3. azure/storage/blob/_blob_client.pyi +780 -0
  4. azure/storage/blob/_blob_client_helpers.py +4 -3
  5. azure/storage/blob/_blob_service_client.py +57 -17
  6. azure/storage/blob/_blob_service_client.pyi +182 -0
  7. azure/storage/blob/_container_client.py +47 -22
  8. azure/storage/blob/_container_client.pyi +380 -0
  9. azure/storage/blob/_deserialize.py +1 -1
  10. azure/storage/blob/_download.py +7 -7
  11. azure/storage/blob/_encryption.py +177 -184
  12. azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
  13. azure/storage/blob/_generated/_configuration.py +2 -2
  14. azure/storage/blob/_generated/_utils/__init__.py +6 -0
  15. azure/storage/blob/_generated/{_serialization.py → _utils/serialization.py} +4 -22
  16. azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
  17. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  18. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +6 -10
  19. azure/storage/blob/_generated/aio/operations/_blob_operations.py +35 -39
  20. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +9 -13
  21. azure/storage/blob/_generated/aio/operations/_container_operations.py +20 -24
  22. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +13 -17
  23. azure/storage/blob/_generated/aio/operations/_service_operations.py +10 -14
  24. azure/storage/blob/_generated/models/_models_py3.py +30 -9
  25. azure/storage/blob/_generated/operations/_append_blob_operations.py +11 -15
  26. azure/storage/blob/_generated/operations/_blob_operations.py +60 -64
  27. azure/storage/blob/_generated/operations/_block_blob_operations.py +16 -20
  28. azure/storage/blob/_generated/operations/_container_operations.py +39 -43
  29. azure/storage/blob/_generated/operations/_page_blob_operations.py +23 -27
  30. azure/storage/blob/_generated/operations/_service_operations.py +19 -23
  31. azure/storage/blob/_lease.py +3 -2
  32. azure/storage/blob/_lease.pyi +81 -0
  33. azure/storage/blob/_list_blobs_helper.py +1 -1
  34. azure/storage/blob/_quick_query_helper.py +3 -3
  35. azure/storage/blob/_serialize.py +1 -0
  36. azure/storage/blob/_shared/__init__.py +7 -7
  37. azure/storage/blob/_shared/authentication.py +49 -32
  38. azure/storage/blob/_shared/avro/avro_io.py +44 -42
  39. azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
  40. azure/storage/blob/_shared/avro/datafile.py +24 -21
  41. azure/storage/blob/_shared/avro/datafile_async.py +15 -15
  42. azure/storage/blob/_shared/avro/schema.py +196 -217
  43. azure/storage/blob/_shared/base_client.py +79 -70
  44. azure/storage/blob/_shared/base_client_async.py +53 -68
  45. azure/storage/blob/_shared/constants.py +1 -1
  46. azure/storage/blob/_shared/models.py +94 -92
  47. azure/storage/blob/_shared/parser.py +3 -3
  48. azure/storage/blob/_shared/policies.py +186 -147
  49. azure/storage/blob/_shared/policies_async.py +58 -69
  50. azure/storage/blob/_shared/request_handlers.py +50 -45
  51. azure/storage/blob/_shared/response_handlers.py +54 -45
  52. azure/storage/blob/_shared/shared_access_signature.py +65 -73
  53. azure/storage/blob/_shared/uploads.py +56 -49
  54. azure/storage/blob/_shared/uploads_async.py +70 -58
  55. azure/storage/blob/_version.py +1 -1
  56. azure/storage/blob/aio/__init__.py +8 -10
  57. azure/storage/blob/aio/_blob_client_async.py +81 -48
  58. azure/storage/blob/aio/_blob_client_async.pyi +763 -0
  59. azure/storage/blob/aio/_blob_service_client_async.py +54 -15
  60. azure/storage/blob/aio/_blob_service_client_async.pyi +187 -0
  61. azure/storage/blob/aio/_container_client_async.py +55 -26
  62. azure/storage/blob/aio/_container_client_async.pyi +384 -0
  63. azure/storage/blob/aio/_download_async.py +15 -11
  64. azure/storage/blob/aio/_lease_async.py +3 -2
  65. azure/storage/blob/aio/_lease_async.pyi +81 -0
  66. azure/storage/blob/aio/_quick_query_helper_async.py +3 -3
  67. {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/METADATA +18 -6
  68. azure_storage_blob-12.27.0.dist-info/RECORD +94 -0
  69. {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/WHEEL +1 -1
  70. azure_storage_blob-12.26.0b1.dist-info/RECORD +0 -85
  71. {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info/licenses}/LICENSE +0 -0
  72. {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/top_level.txt +0 -0
@@ -122,11 +122,11 @@ def upload_blob_to_url(
122
122
  entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
123
123
  :keyword str encoding:
124
124
  Encoding to use if text is supplied as input. Defaults to UTF-8.
125
- :returns: Blob-updated property dict (Etag and last modified)
125
+ :return: Blob-updated property dict (Etag and last modified)
126
126
  :rtype: dict(str, Any)
127
127
  """
128
- with BlobClient.from_blob_url(blob_url, credential=credential) as client:
129
- return cast(BlobClient, client).upload_blob(data=data, blob_type=BlobType.BLOCKBLOB, **kwargs)
128
+ with BlobClient.from_blob_url(blob_url, credential=credential) as client: # pylint: disable=not-context-manager
129
+ return client.upload_blob(data=data, blob_type=BlobType.BLOCKBLOB, **kwargs)
130
130
 
131
131
 
132
132
  def _download_to_stream(client: BlobClient, handle: IO[bytes], **kwargs: Any) -> None:
@@ -153,7 +153,7 @@ def download_blob_from_url(
153
153
  :param output:
154
154
  Where the data should be downloaded to. This could be either a file path to write to,
155
155
  or an open IO handle to write to.
156
- :type output: str or writable stream.
156
+ :type output: str or IO.
157
157
  :param credential:
158
158
  The credentials with which to authenticate. This is optional if the
159
159
  blob URL already has a SAS token or the blob is public. The value can be a SAS token string,
@@ -190,10 +190,11 @@ def download_blob_from_url(
190
190
  blob. Also note that if enabled, the memory-efficient upload algorithm
191
191
  will not be used, because computing the MD5 hash requires buffering
192
192
  entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
193
+ :return: None
193
194
  :rtype: None
194
195
  """
195
196
  overwrite = kwargs.pop('overwrite', False)
196
- with BlobClient.from_blob_url(blob_url, credential=credential) as client:
197
+ with BlobClient.from_blob_url(blob_url, credential=credential) as client: # pylint: disable=not-context-manager
197
198
  if hasattr(output, 'write'):
198
199
  _download_to_stream(client, cast(IO[bytes], output), **kwargs)
199
200
  else:
@@ -190,6 +190,22 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
190
190
  self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
191
191
  self._configure_encryption(kwargs)
192
192
 
193
+ def __enter__(self) -> Self:
194
+ self._client.__enter__()
195
+ return self
196
+
197
+ def __exit__(self, *args) -> None:
198
+ self._client.__exit__(*args)
199
+
200
+ def close(self) -> None:
201
+ """This method is to close the sockets opened by the client.
202
+ It need not be used when using with a context manager.
203
+
204
+ :return: None
205
+ :rtype: None
206
+ """
207
+ self._client.close()
208
+
193
209
  def _format_url(self, hostname: str) -> str:
194
210
  return _format_url(
195
211
  container_name=self.container_name,
@@ -236,7 +252,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
236
252
  :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
237
253
  authentication. Only has an effect when credential is of type TokenCredential. The value could be
238
254
  https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
239
- :returns: A Blob client.
255
+ :return: A Blob client.
240
256
  :rtype: ~azure.storage.blob.BlobClient
241
257
  """
242
258
  account_url, container_name, blob_name, path_snapshot = _from_blob_url(blob_url=blob_url, snapshot=snapshot)
@@ -284,7 +300,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
284
300
  :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
285
301
  authentication. Only has an effect when credential is of type TokenCredential. The value could be
286
302
  https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
287
- :returns: A Blob client.
303
+ :return: A Blob client.
288
304
  :rtype: ~azure.storage.blob.BlobClient
289
305
 
290
306
  .. admonition:: Example:
@@ -311,7 +327,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
311
327
  The information can also be retrieved if the user has a SAS to a container or blob.
312
328
  The keys in the returned dictionary include 'sku_name' and 'account_kind'.
313
329
 
314
- :returns: A dict of account information (SKU and account type).
330
+ :return: A dict of account information (SKU and account type).
315
331
  :rtype: dict(str, str)
316
332
  """
317
333
  try:
@@ -431,7 +447,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
431
447
  ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
432
448
 
433
449
  :paramtype source_token_intent: Literal['backup']
434
- :returns: Blob-updated property Dict (Etag and last modified)
450
+ :return: Blob-updated property Dict (Etag and last modified)
435
451
  :rtype: Dict[str, Any]
436
452
  """
437
453
  if kwargs.get('cpk') and self.scheme.lower() != 'https':
@@ -580,7 +596,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
580
596
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
581
597
  #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
582
598
  the timeout will apply to each call individually.
583
- :returns: Blob-updated property Dict (Etag and last modified)
599
+ :return: Blob-updated property Dict (Etag and last modified)
584
600
  :rtype: Dict[str, Any]
585
601
 
586
602
  .. admonition:: Example:
@@ -725,7 +741,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
725
741
  the timeout will apply to each call individually.
726
742
  multiple calls to the Azure service and the timeout will apply to
727
743
  each call individually.
728
- :returns: A streaming object (StorageStreamDownloader)
744
+ :return: A streaming object (StorageStreamDownloader)
729
745
  :rtype: ~azure.storage.blob.StorageStreamDownloader
730
746
 
731
747
  .. admonition:: Example:
@@ -829,7 +845,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
829
845
  This value is not tracked or validated on the client. To configure client-side network timesouts
830
846
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
831
847
  #other-client--per-operation-configuration>`__.
832
- :returns: A streaming object (BlobQueryReader)
848
+ :return: A streaming object (BlobQueryReader)
833
849
  :rtype: ~azure.storage.blob.BlobQueryReader
834
850
 
835
851
  .. admonition:: Example:
@@ -874,7 +890,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
874
890
  and retains the blob for a specified number of days.
875
891
  After the specified number of days, the blob's data is removed from the service during garbage collection.
876
892
  Soft deleted blob is accessible through :func:`~ContainerClient.list_blobs()` specifying `include=['deleted']`
877
- option. Soft-deleted blob can be restored using :func:`undelete` operation.
893
+ option. Soft-deleted blob can be restored using :func:`~BlobClient.undelete_blob()` operation.
878
894
 
879
895
  :param Optional[str] delete_snapshots:
880
896
  Required if the blob has associated snapshots. Values include:
@@ -922,6 +938,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
922
938
  This value is not tracked or validated on the client. To configure client-side network timesouts
923
939
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
924
940
  #other-client--per-operation-configuration>`__.
941
+ :return: None
925
942
  :rtype: None
926
943
 
927
944
  .. admonition:: Example:
@@ -960,6 +977,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
960
977
  This value is not tracked or validated on the client. To configure client-side network timesouts
961
978
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
962
979
  #other-client--per-operation-configuration>`__.
980
+ :return: None
963
981
  :rtype: None
964
982
 
965
983
  .. admonition:: Example:
@@ -991,7 +1009,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
991
1009
  This value is not tracked or validated on the client. To configure client-side network timesouts
992
1010
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
993
1011
  #other-client--per-operation-configuration>`__.
994
- :returns: boolean
1012
+ :return: boolean
995
1013
  :rtype: bool
996
1014
  """
997
1015
  version_id = get_version_id(self.version_id, kwargs)
@@ -1061,7 +1079,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1061
1079
  This value is not tracked or validated on the client. To configure client-side network timesouts
1062
1080
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1063
1081
  #other-client--per-operation-configuration>`__.
1064
- :returns: BlobProperties
1082
+ :return: BlobProperties
1065
1083
  :rtype: ~azure.storage.blob.BlobProperties
1066
1084
 
1067
1085
  .. admonition:: Example:
@@ -1147,7 +1165,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1147
1165
  This value is not tracked or validated on the client. To configure client-side network timesouts
1148
1166
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1149
1167
  #other-client--per-operation-configuration>`__.
1150
- :returns: Blob-updated property dict (Etag and last modified)
1168
+ :return: Blob-updated property dict (Etag and last modified)
1151
1169
  :rtype: Dict[str, Any]
1152
1170
  """
1153
1171
  options = _set_http_headers_options(content_settings=content_settings, **kwargs)
@@ -1214,7 +1232,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1214
1232
  This value is not tracked or validated on the client. To configure client-side network timesouts
1215
1233
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1216
1234
  #other-client--per-operation-configuration>`__.
1217
- :returns: Blob-updated property dict (Etag and last modified)
1235
+ :return: Blob-updated property dict (Etag and last modified)
1218
1236
  :rtype: Dict[str, Union[str, datetime]]
1219
1237
  """
1220
1238
  if kwargs.get('cpk') and self.scheme.lower() != 'https':
@@ -1250,7 +1268,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1250
1268
  This value is not tracked or validated on the client. To configure client-side network timesouts
1251
1269
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1252
1270
  #other-client--per-operation-configuration>`__.
1253
- :returns: Key value pairs of blob tags.
1271
+ :return: Key value pairs of blob tags.
1254
1272
  :rtype: Dict[str, str]
1255
1273
  """
1256
1274
 
@@ -1276,7 +1294,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1276
1294
  This value is not tracked or validated on the client. To configure client-side network timesouts
1277
1295
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1278
1296
  #other-client--per-operation-configuration>`__.
1279
- :returns: Key value pairs of blob tags.
1297
+ :return: Key value pairs of blob tags.
1280
1298
  :rtype: Dict[str, str]
1281
1299
  """
1282
1300
 
@@ -1301,7 +1319,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1301
1319
  This value is not tracked or validated on the client. To configure client-side network timesouts
1302
1320
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1303
1321
  #other-client--per-operation-configuration>`__.
1304
- :returns: Key value pairs of blob tags.
1322
+ :return: Key value pairs of blob tags.
1305
1323
  :rtype: Dict[str, Union[str, datetime, bool]]
1306
1324
  """
1307
1325
 
@@ -1398,7 +1416,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1398
1416
  This value is not tracked or validated on the client. To configure client-side network timesouts
1399
1417
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1400
1418
  #other-client--per-operation-configuration>`__.
1401
- :returns: Blob-updated property dict (Etag and last modified).
1419
+ :return: Blob-updated property dict (Etag and last modified).
1402
1420
  :rtype: dict[str, Any]
1403
1421
  """
1404
1422
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -1494,7 +1512,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1494
1512
  This value is not tracked or validated on the client. To configure client-side network timesouts
1495
1513
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1496
1514
  #other-client--per-operation-configuration>`__.
1497
- :returns: Blob-updated property dict (Etag and last modified).
1515
+ :return: Blob-updated property dict (Etag and last modified).
1498
1516
  :rtype: dict[str, Any]
1499
1517
  """
1500
1518
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -1573,7 +1591,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1573
1591
  This value is not tracked or validated on the client. To configure client-side network timesouts
1574
1592
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1575
1593
  #other-client--per-operation-configuration>`__.
1576
- :returns: Blob-updated property dict (Snapshot ID, Etag, and last modified).
1594
+ :return: Blob-updated property dict (Snapshot ID, Etag, and last modified).
1577
1595
  :rtype: dict[str, Any]
1578
1596
 
1579
1597
  .. admonition:: Example:
@@ -1773,7 +1791,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1773
1791
 
1774
1792
  .. versionadded:: 12.10.0
1775
1793
 
1776
- :returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
1794
+ :return: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
1777
1795
  :rtype: dict[str, Union[str, ~datetime.datetime]]
1778
1796
 
1779
1797
  .. admonition:: Example:
@@ -1812,6 +1830,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1812
1830
  The copy operation to abort. This can be either an ID string, or an
1813
1831
  instance of BlobProperties.
1814
1832
  :type copy_id: str or ~azure.storage.blob.BlobProperties
1833
+ :return: None
1815
1834
  :rtype: None
1816
1835
 
1817
1836
  .. admonition:: Example:
@@ -1874,7 +1893,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1874
1893
  This value is not tracked or validated on the client. To configure client-side network timesouts
1875
1894
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
1876
1895
  #other-client--per-operation-configuration>`__.
1877
- :returns: A BlobLeaseClient object.
1896
+ :return: A BlobLeaseClient object.
1878
1897
  :rtype: ~azure.storage.blob.BlobLeaseClient
1879
1898
 
1880
1899
  .. admonition:: Example:
@@ -1930,6 +1949,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
1930
1949
  Required if the blob has an active lease. Value can be a BlobLeaseClient object
1931
1950
  or the lease ID as a string.
1932
1951
  :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
1952
+ :return: None
1933
1953
  :rtype: None
1934
1954
  """
1935
1955
  access_conditions = get_access_conditions(kwargs.pop('lease', None))
@@ -2000,7 +2020,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2000
2020
  This value is not tracked or validated on the client. To configure client-side network timesouts
2001
2021
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2002
2022
  #other-client--per-operation-configuration>`__.
2003
- :returns: Blob property dict.
2023
+ :return: Blob property dict.
2004
2024
  :rtype: dict[str, Any]
2005
2025
  """
2006
2026
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -2075,7 +2095,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2075
2095
  ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
2076
2096
 
2077
2097
  :paramtype source_token_intent: Literal['backup']
2078
- :returns: Blob property dict.
2098
+ :return: Blob property dict.
2079
2099
  :rtype: dict[str, Any]
2080
2100
  """
2081
2101
  if kwargs.get('cpk') and self.scheme.lower() != 'https':
@@ -2120,7 +2140,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2120
2140
  This value is not tracked or validated on the client. To configure client-side network timesouts
2121
2141
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2122
2142
  #other-client--per-operation-configuration>`__.
2123
- :returns: A tuple of two lists - committed and uncommitted blocks
2143
+ :return: A tuple of two lists - committed and uncommitted blocks
2124
2144
  :rtype: Tuple[List[BlobBlock], List[BlobBlock]]
2125
2145
  """
2126
2146
  access_conditions = get_access_conditions(kwargs.pop('lease', None))
@@ -2232,7 +2252,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2232
2252
  This value is not tracked or validated on the client. To configure client-side network timesouts
2233
2253
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2234
2254
  #other-client--per-operation-configuration>`__.
2235
- :returns: Blob-updated property dict (Etag and last modified).
2255
+ :return: Blob-updated property dict (Etag and last modified).
2236
2256
  :rtype: dict(str, Any)
2237
2257
  """
2238
2258
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -2274,6 +2294,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2274
2294
  Required if the blob has an active lease. Value can be a BlobLeaseClient object
2275
2295
  or the lease ID as a string.
2276
2296
  :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
2297
+ :return: None
2277
2298
  :rtype: None
2278
2299
  """
2279
2300
  access_conditions = get_access_conditions(kwargs.pop('lease', None))
@@ -2329,7 +2350,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2329
2350
  This value is not tracked or validated on the client. To configure client-side network timesouts
2330
2351
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2331
2352
  #other-client--per-operation-configuration>`__.
2332
- :returns: Blob-updated property dict (Etag and last modified)
2353
+ :return: Blob-updated property dict (Etag and last modified)
2333
2354
  :rtype: Dict[str, Any]
2334
2355
  """
2335
2356
  version_id = get_version_id(self.version_id, kwargs)
@@ -2362,7 +2383,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2362
2383
  This value is not tracked or validated on the client. To configure client-side network timesouts
2363
2384
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2364
2385
  #other-client--per-operation-configuration>`__.
2365
- :returns: Key value pairs of blob tags.
2386
+ :return: Key value pairs of blob tags.
2366
2387
  :rtype: Dict[str, str]
2367
2388
  """
2368
2389
  version_id = get_version_id(self.version_id, kwargs)
@@ -2434,7 +2455,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2434
2455
  This value is not tracked or validated on the client. To configure client-side network timesouts
2435
2456
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2436
2457
  #other-client--per-operation-configuration>`__.
2437
- :returns:
2458
+ :return:
2438
2459
  A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
2439
2460
  The first element are filled page ranges, the 2nd element is cleared page ranges.
2440
2461
  :rtype: tuple(list(dict(str, str), list(dict(str, str))
@@ -2527,7 +2548,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2527
2548
  This value is not tracked or validated on the client. To configure client-side network timesouts
2528
2549
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2529
2550
  #other-client--per-operation-configuration>`__.
2530
- :returns: An iterable (auto-paging) of PageRange.
2551
+ :return: An iterable (auto-paging) of PageRange.
2531
2552
  :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.PageRange]
2532
2553
  """
2533
2554
  results_per_page = kwargs.pop('results_per_page', None)
@@ -2610,7 +2631,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2610
2631
  This value is not tracked or validated on the client. To configure client-side network timesouts
2611
2632
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2612
2633
  #other-client--per-operation-configuration>`__.
2613
- :returns:
2634
+ :return:
2614
2635
  A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
2615
2636
  The first element are filled page ranges, the 2nd element is cleared page ranges.
2616
2637
  :rtype: tuple(list(dict(str, str), list(dict(str, str))
@@ -2675,7 +2696,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2675
2696
  This value is not tracked or validated on the client. To configure client-side network timesouts
2676
2697
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2677
2698
  #other-client--per-operation-configuration>`__.
2678
- :returns: Blob-updated property dict (Etag and last modified).
2699
+ :return: Blob-updated property dict (Etag and last modified).
2679
2700
  :rtype: dict(str, Any)
2680
2701
  """
2681
2702
  options = _set_sequence_number_options(sequence_number_action, sequence_number=sequence_number, **kwargs)
@@ -2731,7 +2752,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2731
2752
  This value is not tracked or validated on the client. To configure client-side network timesouts
2732
2753
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2733
2754
  #other-client--per-operation-configuration>`__.
2734
- :returns: Blob-updated property dict (Etag and last modified).
2755
+ :return: Blob-updated property dict (Etag and last modified).
2735
2756
  :rtype: dict(str, Any)
2736
2757
  """
2737
2758
  if kwargs.get('cpk') and self.scheme.lower() != 'https':
@@ -2827,7 +2848,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2827
2848
  This value is not tracked or validated on the client. To configure client-side network timesouts
2828
2849
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
2829
2850
  #other-client--per-operation-configuration>`__.
2830
- :returns: Blob-updated property dict (Etag and last modified).
2851
+ :return: Blob-updated property dict (Etag and last modified).
2831
2852
  :rtype: dict(str, Any)
2832
2853
  """
2833
2854
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -2958,7 +2979,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
2958
2979
  ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
2959
2980
 
2960
2981
  :paramtype source_token_intent: Literal['backup']
2961
- :returns: Response after uploading pages from specified URL.
2982
+ :return: Response after uploading pages from specified URL.
2962
2983
  :rtype: Dict[str, Any]
2963
2984
  """
2964
2985
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -3038,7 +3059,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
3038
3059
  This value is not tracked or validated on the client. To configure client-side network timesouts
3039
3060
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
3040
3061
  #other-client--per-operation-configuration>`__.
3041
- :returns: Blob-updated property dict (Etag and last modified).
3062
+ :return: Blob-updated property dict (Etag and last modified).
3042
3063
  :rtype: dict(str, Any)
3043
3064
  """
3044
3065
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -3135,7 +3156,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
3135
3156
  This value is not tracked or validated on the client. To configure client-side network timesouts
3136
3157
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
3137
3158
  #other-client--per-operation-configuration>`__.
3138
- :returns: Blob-updated property dict (Etag, last modified, append offset, committed block count).
3159
+ :return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
3139
3160
  :rtype: dict(str, Any)
3140
3161
  """
3141
3162
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -3259,7 +3280,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
3259
3280
  ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
3260
3281
 
3261
3282
  :paramtype source_token_intent: Literal['backup']
3262
- :returns: Result after appending a new block.
3283
+ :return: Result after appending a new block.
3263
3284
  :rtype: Dict[str, Union[str, datetime, int]]
3264
3285
  """
3265
3286
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -3317,7 +3338,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
3317
3338
  This value is not tracked or validated on the client. To configure client-side network timesouts
3318
3339
  see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
3319
3340
  #other-client--per-operation-configuration>`__.
3320
- :returns: Blob-updated property dict (Etag, last modified, append offset, committed block count).
3341
+ :return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
3321
3342
  :rtype: dict(str, Any)
3322
3343
  """
3323
3344
  if self.require_encryption or (self.key_encryption_key is not None):
@@ -3334,7 +3355,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
3334
3355
 
3335
3356
  The container need not already exist. Defaults to current blob's credentials.
3336
3357
 
3337
- :returns: A ContainerClient.
3358
+ :return: A ContainerClient.
3338
3359
  :rtype: ~azure.storage.blob.ContainerClient
3339
3360
 
3340
3361
  .. admonition:: Example: