azure-storage-blob 12.23.1__py3-none-any.whl → 12.24.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 (52) hide show
  1. azure/storage/blob/_blob_client.py +34 -10
  2. azure/storage/blob/_blob_client_helpers.py +7 -3
  3. azure/storage/blob/_blob_service_client.py +1 -1
  4. azure/storage/blob/_container_client.py +2 -2
  5. azure/storage/blob/_container_client_helpers.py +4 -4
  6. azure/storage/blob/_deserialize.py +2 -2
  7. azure/storage/blob/_encryption.py +2 -0
  8. azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
  9. azure/storage/blob/_generated/_configuration.py +2 -2
  10. azure/storage/blob/_generated/_serialization.py +265 -150
  11. azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
  12. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +22 -4
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +116 -26
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +40 -6
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +36 -18
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +32 -9
  18. azure/storage/blob/_generated/aio/operations/_service_operations.py +16 -8
  19. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +34 -8
  21. azure/storage/blob/_generated/operations/_blob_operations.py +166 -51
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +62 -12
  23. azure/storage/blob/_generated/operations/_container_operations.py +54 -36
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +49 -18
  25. azure/storage/blob/_generated/operations/_service_operations.py +24 -16
  26. azure/storage/blob/_list_blobs_helper.py +1 -1
  27. azure/storage/blob/_models.py +4 -3
  28. azure/storage/blob/_serialize.py +1 -0
  29. azure/storage/blob/_shared/avro/schema.py +1 -0
  30. azure/storage/blob/_shared/base_client.py +8 -8
  31. azure/storage/blob/_shared/base_client_async.py +5 -5
  32. azure/storage/blob/_shared/models.py +5 -2
  33. azure/storage/blob/_shared/policies.py +6 -7
  34. azure/storage/blob/_shared/policies_async.py +1 -1
  35. azure/storage/blob/_shared/request_handlers.py +2 -3
  36. azure/storage/blob/_shared/response_handlers.py +2 -2
  37. azure/storage/blob/_shared/uploads.py +4 -4
  38. azure/storage/blob/_shared/uploads_async.py +4 -4
  39. azure/storage/blob/_shared_access_signature.py +0 -1
  40. azure/storage/blob/_version.py +1 -1
  41. azure/storage/blob/aio/_blob_client_async.py +36 -13
  42. azure/storage/blob/aio/_blob_service_client_async.py +7 -3
  43. azure/storage/blob/aio/_container_client_async.py +4 -4
  44. azure/storage/blob/aio/_lease_async.py +1 -1
  45. azure/storage/blob/aio/_list_blobs_helper.py +1 -2
  46. azure/storage/blob/aio/_models.py +1 -2
  47. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0.dist-info}/METADATA +9 -9
  48. azure_storage_blob-12.24.0.dist-info/RECORD +84 -0
  49. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0.dist-info}/WHEEL +1 -1
  50. azure_storage_blob-12.23.1.dist-info/RECORD +0 -84
  51. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0.dist-info}/LICENSE +0 -0
  52. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0.dist-info}/top_level.txt +0 -0
@@ -70,6 +70,7 @@ class StorageErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
70
70
 
71
71
  # Blob values
72
72
  APPEND_POSITION_CONDITION_NOT_MET = "AppendPositionConditionNotMet"
73
+ BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE = "BlobAccessTierNotSupportedForAccountType"
73
74
  BLOB_ALREADY_EXISTS = "BlobAlreadyExists"
74
75
  BLOB_NOT_FOUND = "BlobNotFound"
75
76
  BLOB_OVERWRITTEN = "BlobOverwritten"
@@ -154,6 +155,8 @@ class StorageErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
154
155
  DELETE_PENDING = "DeletePending"
155
156
  DIRECTORY_NOT_EMPTY = "DirectoryNotEmpty"
156
157
  FILE_LOCK_CONFLICT = "FileLockConflict"
158
+ FILE_SHARE_PROVISIONED_BANDWIDTH_DOWNGRADE_NOT_ALLOWED = "FileShareProvisionedBandwidthDowngradeNotAllowed"
159
+ FILE_SHARE_PROVISIONED_IOPS_DOWNGRADE_NOT_ALLOWED = "FileShareProvisionedIopsDowngradeNotAllowed"
157
160
  INVALID_FILE_OR_DIRECTORY_PATH_NAME = "InvalidFileOrDirectoryPathName"
158
161
  PARENT_NOT_FOUND = "ParentNotFound"
159
162
  READ_ONLY_ATTRIBUTE = "ReadOnlyAttribute"
@@ -311,7 +314,7 @@ class ResourceTypes(object):
311
314
  res_object = 'o' in string
312
315
 
313
316
  parsed = cls(res_service, res_container, res_object)
314
- parsed._str = string # pylint: disable = protected-access
317
+ parsed._str = string
315
318
  return parsed
316
319
 
317
320
 
@@ -495,7 +498,7 @@ class Services(object):
495
498
  res_file = 'f' in string
496
499
 
497
500
  parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file)
498
- parsed._str = string # pylint: disable = protected-access
501
+ parsed._str = string
499
502
  return parsed
500
503
 
501
504
 
@@ -72,7 +72,7 @@ def retry_hook(settings, **kwargs):
72
72
  # respect the Retry-After header, whether this header is present, and
73
73
  # whether the returned status code is on the list of status codes to
74
74
  # be retried upon on the presence of the aforementioned header)
75
- def is_retry(response, mode): # pylint: disable=too-many-return-statements
75
+ def is_retry(response, mode):
76
76
  status = response.http_response.status_code
77
77
  if 300 <= status < 500:
78
78
  # An exception occurred, but in most cases it was expected. Examples could
@@ -267,7 +267,7 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy):
267
267
 
268
268
  class StorageRequestHook(SansIOHTTPPolicy):
269
269
 
270
- def __init__(self, **kwargs): # pylint: disable=unused-argument
270
+ def __init__(self, **kwargs):
271
271
  self._request_callback = kwargs.get('raw_request_hook')
272
272
  super(StorageRequestHook, self).__init__()
273
273
 
@@ -279,7 +279,7 @@ class StorageRequestHook(SansIOHTTPPolicy):
279
279
 
280
280
  class StorageResponseHook(HTTPPolicy):
281
281
 
282
- def __init__(self, **kwargs): # pylint: disable=unused-argument
282
+ def __init__(self, **kwargs):
283
283
  self._response_callback = kwargs.get('raw_response_hook')
284
284
  super(StorageResponseHook, self).__init__()
285
285
 
@@ -450,7 +450,7 @@ class StorageRetryPolicy(HTTPPolicy):
450
450
  """ Formula for computing the current backoff.
451
451
  Should be calculated by child class.
452
452
 
453
- :param Dict[str, Any]] settings: The configurable values pertaining to the backoff time.
453
+ :param Dict[str, Any] settings: The configurable values pertaining to the backoff time.
454
454
  :returns: The backoff time.
455
455
  :rtype: float
456
456
  """
@@ -470,12 +470,11 @@ class StorageRetryPolicy(HTTPPolicy):
470
470
  ) -> bool:
471
471
  """Increment the retry counters.
472
472
 
473
- :param Dict[str, Any]] settings: The configurable values pertaining to the increment operation.
473
+ :param Dict[str, Any] settings: The configurable values pertaining to the increment operation.
474
474
  :param PipelineRequest request: A pipeline request object.
475
475
  :param Optional[PipelineResponse] response: A pipeline response object.
476
- :param error: An error encountered during the request, or
476
+ :param Optional[AzureError] error: An error encountered during the request, or
477
477
  None if the response was received successfully.
478
- :type error: Optional[AzureError]
479
478
  :returns: Whether the retry attempts are exhausted.
480
479
  :rtype: bool
481
480
  """
@@ -58,7 +58,7 @@ async def is_checksum_retry(response):
58
58
 
59
59
  class AsyncStorageResponseHook(AsyncHTTPPolicy):
60
60
 
61
- def __init__(self, **kwargs): # pylint: disable=unused-argument
61
+ def __init__(self, **kwargs):
62
62
  self._response_callback = kwargs.get('raw_response_hook')
63
63
  super(AsyncStorageResponseHook, self).__init__()
64
64
 
@@ -4,12 +4,11 @@
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
6
 
7
- from typing import Dict, Optional
8
-
9
7
  import logging
10
- from os import fstat
11
8
  import stat
12
9
  from io import (SEEK_END, SEEK_SET, UnsupportedOperation)
10
+ from os import fstat
11
+ from typing import Dict, Optional
13
12
 
14
13
  import isodate
15
14
 
@@ -60,9 +60,9 @@ def normalize_headers(headers):
60
60
 
61
61
  def deserialize_metadata(response, obj, headers): # pylint: disable=unused-argument
62
62
  try:
63
- raw_metadata = {k: v for k, v in response.http_response.headers.items() if k.startswith("x-ms-meta-")}
63
+ raw_metadata = {k: v for k, v in response.http_response.headers.items() if k.lower().startswith('x-ms-meta-')}
64
64
  except AttributeError:
65
- raw_metadata = {k: v for k, v in response.headers.items() if k.startswith("x-ms-meta-")}
65
+ raw_metadata = {k: v for k, v in response.headers.items() if k.lower().startswith('x-ms-meta-')}
66
66
  return {k[10:]: v for k, v in raw_metadata.items()}
67
67
 
68
68
 
@@ -281,7 +281,7 @@ class BlockBlobChunkUploader(_ChunkUploader):
281
281
  return block_id
282
282
 
283
283
 
284
- class PageBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
284
+ class PageBlobChunkUploader(_ChunkUploader):
285
285
 
286
286
  def _is_chunk_empty(self, chunk_data):
287
287
  # read until non-zero byte is encountered
@@ -312,7 +312,7 @@ class PageBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
312
312
  pass
313
313
 
314
314
 
315
- class AppendBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
315
+ class AppendBlobChunkUploader(_ChunkUploader):
316
316
 
317
317
  def __init__(self, *args, **kwargs):
318
318
  super(AppendBlobChunkUploader, self).__init__(*args, **kwargs)
@@ -345,7 +345,7 @@ class AppendBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-metho
345
345
  pass
346
346
 
347
347
 
348
- class DataLakeFileChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
348
+ class DataLakeFileChunkUploader(_ChunkUploader):
349
349
 
350
350
  def _upload_chunk(self, chunk_offset, chunk_data):
351
351
  # avoid uploading the empty pages
@@ -377,7 +377,7 @@ class DataLakeFileChunkUploader(_ChunkUploader): # pylint: disable=abstract-met
377
377
  block_stream.close()
378
378
 
379
379
 
380
- class FileChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
380
+ class FileChunkUploader(_ChunkUploader):
381
381
 
382
382
  def _upload_chunk(self, chunk_offset, chunk_data):
383
383
  length = len(chunk_data)
@@ -306,7 +306,7 @@ class BlockBlobChunkUploader(_ChunkUploader):
306
306
  return block_id
307
307
 
308
308
 
309
- class PageBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
309
+ class PageBlobChunkUploader(_ChunkUploader):
310
310
 
311
311
  def _is_chunk_empty(self, chunk_data):
312
312
  # read until non-zero byte is encountered
@@ -339,7 +339,7 @@ class PageBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
339
339
  pass
340
340
 
341
341
 
342
- class AppendBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
342
+ class AppendBlobChunkUploader(_ChunkUploader):
343
343
 
344
344
  def __init__(self, *args, **kwargs):
345
345
  super(AppendBlobChunkUploader, self).__init__(*args, **kwargs)
@@ -370,7 +370,7 @@ class AppendBlobChunkUploader(_ChunkUploader): # pylint: disable=abstract-metho
370
370
  pass
371
371
 
372
372
 
373
- class DataLakeFileChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
373
+ class DataLakeFileChunkUploader(_ChunkUploader):
374
374
 
375
375
  async def _upload_chunk(self, chunk_offset, chunk_data):
376
376
  self.response_headers = await self.service.append_data(
@@ -401,7 +401,7 @@ class DataLakeFileChunkUploader(_ChunkUploader): # pylint: disable=abstract-met
401
401
  block_stream.close()
402
402
 
403
403
 
404
- class FileChunkUploader(_ChunkUploader): # pylint: disable=abstract-method
404
+ class FileChunkUploader(_ChunkUploader):
405
405
 
406
406
  async def _upload_chunk(self, chunk_offset, chunk_data):
407
407
  length = len(chunk_data)
@@ -281,7 +281,6 @@ class _BlobSharedAccessHelper(_SharedAccessHelper):
281
281
  return return_value + '\n'
282
282
 
283
283
  def add_resource_signature(self, account_name, account_key, path, user_delegation_key=None):
284
- # pylint: disable = no-member
285
284
  if path[0] != '/':
286
285
  path = '/' + path
287
286
 
@@ -4,4 +4,4 @@
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
6
 
7
- VERSION = "12.23.1"
7
+ VERSION = "12.24.0"
@@ -3,7 +3,7 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
- # pylint: disable=too-many-lines, invalid-overridden-method, docstring-keyword-should-match-keyword-only
6
+ # pylint: disable=too-many-lines, docstring-keyword-should-match-keyword-only
7
7
 
8
8
  import warnings
9
9
  from datetime import datetime
@@ -184,7 +184,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
184
184
  self._query_str, credential = self._format_query_string(sas_token, credential, snapshot=self.snapshot)
185
185
  super(BlobClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
186
186
  self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
187
- self._client._config.version = get_api_version(kwargs) # type: ignore [assignment] # pylint: disable=protected-access
187
+ self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
188
188
  self._configure_encryption(kwargs)
189
189
 
190
190
  def _format_url(self, hostname: str) -> str:
@@ -310,7 +310,12 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
310
310
  process_storage_error(error)
311
311
 
312
312
  @distributed_trace_async
313
- async def upload_blob_from_url(self, source_url: str, **kwargs: Any) -> Dict[str, Any]:
313
+ async def upload_blob_from_url(
314
+ self, source_url: str,
315
+ *,
316
+ metadata: Optional[Dict[str, str]] = None,
317
+ **kwargs: Any
318
+ ) -> Dict[str, Any]:
314
319
  """
315
320
  Creates a new Block Blob where the content of the blob is read from a given URL.
316
321
  The content of an existing blob is overwritten with the new blob.
@@ -327,6 +332,8 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
327
332
  https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
328
333
 
329
334
  https://otheraccount.blob.core.windows.net/mycontainer/myblob?sastoken
335
+ :keyword dict(str, str) metadata:
336
+ Name-value pairs associated with the blob as metadata.
330
337
  :keyword bool overwrite: Whether the blob to be uploaded should overwrite the current data.
331
338
  If True, upload_blob will overwrite the existing data. If set to False, the
332
339
  operation will fail with ResourceExistsError.
@@ -412,6 +419,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
412
419
  raise ValueError("Customer provided encryption key must be used over HTTPS.")
413
420
  options = _upload_blob_from_url_options(
414
421
  source_url=source_url,
422
+ metadata=metadata,
415
423
  **kwargs)
416
424
  try:
417
425
  return cast(Dict[str, Any], await self._client.block_blob.put_blob_from_url(**options))
@@ -522,8 +530,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
522
530
  value specified in this header, the request will fail with
523
531
  MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
524
532
  :keyword int max_concurrency:
525
- Maximum number of parallel connections to use when the blob size exceeds
526
- 64MB.
533
+ Maximum number of parallel connections to use when transferring the blob in chunks.
534
+ This option does not affect the underlying connection pool, and may
535
+ require a separate configuration of the connection pool.
527
536
  :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
528
537
  Encrypts the data on the service-side with the given key.
529
538
  Use of customer-provided keys must be done over HTTPS.
@@ -679,7 +688,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
679
688
  As the encryption key itself is provided in the request,
680
689
  a secure connection must be established to transfer the key.
681
690
  :keyword int max_concurrency:
682
- The number of parallel connections with which to download.
691
+ Maximum number of parallel connections to use when transferring the blob in chunks.
692
+ This option does not affect the underlying connection pool, and may
693
+ require a separate configuration of the connection pool.
683
694
  :keyword str encoding:
684
695
  Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
685
696
  :keyword progress_hook:
@@ -1117,6 +1128,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1117
1128
  .. versionadded:: 12.10.0
1118
1129
  This was introduced in API version '2020-10-02'.
1119
1130
 
1131
+ :keyword str version_id:
1132
+ The version id parameter is an opaque DateTime
1133
+ value that, when present, specifies the version of the blob to check if it exists.
1120
1134
  :keyword int timeout:
1121
1135
  Sets the server-side timeout for the operation in seconds. For more details see
1122
1136
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
@@ -1127,10 +1141,11 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1127
1141
  :rtype: Dict[str, str]
1128
1142
  """
1129
1143
 
1144
+ version_id = get_version_id(self.version_id, kwargs)
1130
1145
  kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
1131
1146
  kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
1132
- return cast(Dict[str, str],
1133
- await self._client.blob.set_immutability_policy(cls=return_response_headers, **kwargs))
1147
+ return cast(Dict[str, str], await self._client.blob.set_immutability_policy(
1148
+ cls=return_response_headers,version_id=version_id, **kwargs))
1134
1149
 
1135
1150
  @distributed_trace_async
1136
1151
  async def delete_immutability_policy(self, **kwargs: Any) -> None:
@@ -1139,6 +1154,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1139
1154
  .. versionadded:: 12.10.0
1140
1155
  This operation was introduced in API version '2020-10-02'.
1141
1156
 
1157
+ :keyword str version_id:
1158
+ The version id parameter is an opaque DateTime
1159
+ value that, when present, specifies the version of the blob to check if it exists.
1142
1160
  :keyword int timeout:
1143
1161
  Sets the server-side timeout for the operation in seconds. For more details see
1144
1162
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
@@ -1149,7 +1167,8 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1149
1167
  :rtype: Dict[str, str]
1150
1168
  """
1151
1169
 
1152
- await self._client.blob.delete_immutability_policy(**kwargs)
1170
+ version_id = get_version_id(self.version_id, kwargs)
1171
+ await self._client.blob.delete_immutability_policy(version_id=version_id, **kwargs)
1153
1172
 
1154
1173
  @distributed_trace_async
1155
1174
  async def set_legal_hold(self, legal_hold: bool, **kwargs: Any) -> Dict[str, Union[str, datetime, bool]]:
@@ -1160,6 +1179,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1160
1179
 
1161
1180
  :param bool legal_hold:
1162
1181
  Specified if a legal hold should be set on the blob.
1182
+ :keyword str version_id:
1183
+ The version id parameter is an opaque DateTime
1184
+ value that, when present, specifies the version of the blob to check if it exists.
1163
1185
  :keyword int timeout:
1164
1186
  Sets the server-side timeout for the operation in seconds. For more details see
1165
1187
  https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
@@ -1170,8 +1192,9 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
1170
1192
  :rtype: Dict[str, Union[str, datetime, bool]]
1171
1193
  """
1172
1194
 
1173
- return cast(Dict[str, Union[str, datetime, bool]],
1174
- await self._client.blob.set_legal_hold(legal_hold, cls=return_response_headers, **kwargs))
1195
+ version_id = get_version_id(self.version_id, kwargs)
1196
+ return cast(Dict[str, Union[str, datetime, bool]], await self._client.blob.set_legal_hold(
1197
+ legal_hold, version_id=version_id, cls=return_response_headers, **kwargs))
1175
1198
 
1176
1199
  @distributed_trace_async
1177
1200
  async def create_page_blob(
@@ -2216,7 +2239,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
2216
2239
  options = _get_blob_tags_options(version_id=version_id, snapshot=self.snapshot, **kwargs)
2217
2240
  try:
2218
2241
  _, tags = await self._client.blob.get_tags(**options)
2219
- return cast(Dict[str, str], parse_tags(tags)) # pylint: disable=protected-access
2242
+ return cast(Dict[str, str], parse_tags(tags))
2220
2243
  except HttpResponseError as error:
2221
2244
  process_storage_error(error)
2222
2245
 
@@ -3183,7 +3206,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
3183
3206
  self._pipeline._impl_policies) # pylint: disable = protected-access
3184
3207
  )
3185
3208
  else:
3186
- _pipeline = self._pipeline # pylint: disable = protected-access
3209
+ _pipeline = self._pipeline
3187
3210
  return ContainerClient(
3188
3211
  f"{self.scheme}://{self.primary_hostname}", container_name=self.container_name,
3189
3212
  credential=self._raw_credential, api_version=self.api_version, _configuration=self._config,
@@ -3,7 +3,7 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
- # pylint: disable=invalid-overridden-method, docstring-keyword-should-match-keyword-only
6
+ # pylint: disable=docstring-keyword-should-match-keyword-only
7
7
 
8
8
  import functools
9
9
  import warnings
@@ -58,7 +58,11 @@ if TYPE_CHECKING:
58
58
  from .._shared.models import UserDelegationKey
59
59
 
60
60
 
61
- class BlobServiceClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, StorageEncryptionMixin): # type: ignore [misc] # pylint: disable=line-too-long
61
+ class BlobServiceClient( # type: ignore [misc]
62
+ AsyncStorageAccountHostsMixin,
63
+ StorageAccountHostsMixin,
64
+ StorageEncryptionMixin
65
+ ):
62
66
  """A client to interact with the Blob Service at the account level.
63
67
 
64
68
  This client provides operations to retrieve and configure the account properties
@@ -132,7 +136,7 @@ class BlobServiceClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin,
132
136
  self._query_str, credential = self._format_query_string(sas_token, credential)
133
137
  super(BlobServiceClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
134
138
  self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
135
- self._client._config.version = get_api_version(kwargs) # type: ignore [assignment] # pylint: disable=protected-access
139
+ self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
136
140
  self._configure_encryption(kwargs)
137
141
 
138
142
  def _format_url(self, hostname):
@@ -3,7 +3,7 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
- # pylint: disable=too-many-lines, invalid-overridden-method, docstring-keyword-should-match-keyword-only
6
+ # pylint: disable=too-many-lines, docstring-keyword-should-match-keyword-only
7
7
 
8
8
  import functools
9
9
  import warnings
@@ -597,7 +597,7 @@ class ContainerClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, S
597
597
  mod_conditions = get_modify_conditions(kwargs)
598
598
  timeout = kwargs.pop('timeout', None)
599
599
  try:
600
- return await self._client.container.set_metadata( # type: ignore
600
+ return await self._client.container.set_metadata( # type: ignore
601
601
  timeout=timeout,
602
602
  lease_access_conditions=access_conditions,
603
603
  modified_access_conditions=mod_conditions,
@@ -608,7 +608,7 @@ class ContainerClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, S
608
608
  process_storage_error(error)
609
609
 
610
610
  @distributed_trace
611
- def _get_blob_service_client(self) -> "BlobServiceClient": # pylint: disable=client-method-missing-kwargs
611
+ def _get_blob_service_client(self) -> "BlobServiceClient":
612
612
  """Get a client to interact with the container's parent service account.
613
613
 
614
614
  Defaults to current container's credentials.
@@ -632,7 +632,7 @@ class ContainerClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, S
632
632
  policies=self._pipeline._impl_policies #type: ignore [arg-type] # pylint: disable = protected-access
633
633
  )
634
634
  else:
635
- _pipeline = self._pipeline # pylint: disable = protected-access
635
+ _pipeline = self._pipeline
636
636
  return BlobServiceClient(
637
637
  f"{self.scheme}://{self.primary_hostname}",
638
638
  credential=self._raw_credential, api_version=self.api_version, _configuration=self._config,
@@ -3,7 +3,7 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
- # pylint: disable=invalid-overridden-method, docstring-keyword-should-match-keyword-only
6
+ # pylint: disable=docstring-keyword-should-match-keyword-only
7
7
 
8
8
  import uuid
9
9
  from typing import Any, Optional, Union, TYPE_CHECKING
@@ -1,4 +1,3 @@
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
@@ -102,7 +101,7 @@ class BlobPropertiesPaged(AsyncPageIterator):
102
101
  if isinstance(item, BlobProperties):
103
102
  return item
104
103
  if isinstance(item, BlobItemInternal):
105
- blob = get_blob_properties_from_generated_code(item) # pylint: disable=protected-access
104
+ blob = get_blob_properties_from_generated_code(item)
106
105
  blob.container = self.container # type: ignore [assignment]
107
106
  return blob
108
107
  return item
@@ -3,8 +3,7 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for
4
4
  # license information.
5
5
  # --------------------------------------------------------------------------
6
- # pylint: disable=too-few-public-methods, too-many-instance-attributes
7
- # pylint: disable=super-init-not-called, too-many-lines
6
+ # pylint: disable=too-few-public-methods
8
7
 
9
8
  from typing import Callable, List, Optional, TYPE_CHECKING
10
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: azure-storage-blob
3
- Version: 12.23.1
3
+ Version: 12.24.0
4
4
  Summary: Microsoft Azure Blob Storage Client Library for Python
5
5
  Home-page: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
6
6
  Author: Microsoft Corporation
@@ -116,14 +116,14 @@ The `credential` parameter may be provided in a number of different forms, depen
116
116
 
117
117
  Use the returned token credential to authenticate the client:
118
118
  ```python
119
- from azure.identity import DefaultAzureCredential
120
- from azure.storage.blob import BlobServiceClient
121
- token_credential = DefaultAzureCredential()
122
-
123
- blob_service_client = BlobServiceClient(
124
- account_url="https://<my_account_name>.blob.core.windows.net",
125
- credential=token_credential
126
- )
119
+ from azure.identity import DefaultAzureCredential
120
+ from azure.storage.blob import BlobServiceClient
121
+ token_credential = DefaultAzureCredential()
122
+
123
+ blob_service_client = BlobServiceClient(
124
+ account_url="https://<my_account_name>.blob.core.windows.net",
125
+ credential=token_credential
126
+ )
127
127
  ```
128
128
 
129
129
  2. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview),
@@ -0,0 +1,84 @@
1
+ azure/storage/blob/__init__.py,sha256=2i-4BEmEBQ_qSjF2BfwSyrZXr2s75WgoZlQ6BY8loxI,10694
2
+ azure/storage/blob/_blob_client.py,sha256=LAECeCpfRYcomuqN1IwobxeENl0KjW5K5jNFuUI0u-I,186799
3
+ azure/storage/blob/_blob_client_helpers.py,sha256=-6jDMJB0aUFg7my8WjujiZMkCfU8-0NR3V1_qD9BafE,52033
4
+ azure/storage/blob/_blob_service_client.py,sha256=R2LlyarEBRKMSxkijtysTtBdERQHS05S5rf4e918yQ4,40331
5
+ azure/storage/blob/_blob_service_client_helpers.py,sha256=8jNCrF5rsgdJyAJQTdRR_mcOYuDCw4Nt9AirZk2RYUY,997
6
+ azure/storage/blob/_container_client.py,sha256=y4YVT03RbBDx1KnKLCR7krunnZASfpNe1oJYkDRJvrI,84635
7
+ azure/storage/blob/_container_client_helpers.py,sha256=nwn2c_RBAurLq3hgI5m_mb545rJVtCMHGGxePmVKrCs,12458
8
+ azure/storage/blob/_deserialize.py,sha256=H-sF-bq8JSq_CCgueu5NvP5b2SeppDBpMDjHKxOnjs8,9865
9
+ azure/storage/blob/_download.py,sha256=nvj_IBZuSQWV1fO2iB0n_LAndv95SRhbscuGmxu9hHE,40069
10
+ azure/storage/blob/_encryption.py,sha256=BCqaCshIu1QmsOfcUTmyorO76QS2p80A59LrmJBYBVw,47521
11
+ azure/storage/blob/_lease.py,sha256=ReF0nVfZE8p_clUGpebZPprBdXJ7lOGEqXmJUhvsX5U,18336
12
+ azure/storage/blob/_list_blobs_helper.py,sha256=ElFspHiqQ2vbRvwI9DLY7uKHgDCj1NTQ40icuCOmF0I,13124
13
+ azure/storage/blob/_models.py,sha256=KXzLZejvYq0C80_g-Qh8U4LJawgGSIWwkHOkDFOVo3k,65931
14
+ azure/storage/blob/_quick_query_helper.py,sha256=HO6ufvSEWQSaFJ4CanujE4IN7FYB6y1f8PU0-dItMsk,6663
15
+ azure/storage/blob/_serialize.py,sha256=0pcX1eJKXbvjSVugLmUG8ST5GW0M93oZXE6fPy7Yh38,8164
16
+ azure/storage/blob/_shared_access_signature.py,sha256=bE5Nk68_S3jNZwpGKSu3vQEBmWfOahMz763E7F5Af3g,35316
17
+ azure/storage/blob/_upload_helpers.py,sha256=-ZpqzST-wFdWqCm_I4oWGLTMQ5N0aYb3RHxaMvmf9Q4,14688
18
+ azure/storage/blob/_version.py,sha256=zolSUgYkjYx-GGYhGn4DDeHFsoEwichQda7u5C10NIw,331
19
+ azure/storage/blob/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ azure/storage/blob/_generated/__init__.py,sha256=J2H2yiFhRSsMCNKUI7gaYFIQ4_AAbWjPtzXdOsHFQFI,835
21
+ azure/storage/blob/_generated/_azure_blob_storage.py,sha256=7sOmpoyQp3IPkihUSt7aYI0k24heUthmUvcPuN5nxjQ,5737
22
+ azure/storage/blob/_generated/_configuration.py,sha256=zRg5blzuW7Jz--7I08__aWF5-wZv54fHp6wp5Pqs-fo,2566
23
+ azure/storage/blob/_generated/_patch.py,sha256=MdyWs5y2w9_vYRWulELR-RV2uRYkjYpdB7nTVz2tVY4,1532
24
+ azure/storage/blob/_generated/_serialization.py,sha256=C9Sx_ix5z6mdvlGJeIyW4kfyxfpVZOqxtC50AxFcsDU,84474
25
+ azure/storage/blob/_generated/py.typed,sha256=dcrsqJrcYfTX-ckLFJMTaj6mD8aDe2u0tkQG-ZYxnEg,26
26
+ azure/storage/blob/_generated/aio/__init__.py,sha256=J2H2yiFhRSsMCNKUI7gaYFIQ4_AAbWjPtzXdOsHFQFI,835
27
+ azure/storage/blob/_generated/aio/_azure_blob_storage.py,sha256=RjkAL6eeIugJfn-ZDWKs2NuQ61BDSGcTqvQkV5Ag-ss,5880
28
+ azure/storage/blob/_generated/aio/_configuration.py,sha256=ybj0y3hyHcHSqaoA0yJ86ng0p8ZoJZOj6pEEF3aCKV4,2576
29
+ azure/storage/blob/_generated/aio/_patch.py,sha256=MdyWs5y2w9_vYRWulELR-RV2uRYkjYpdB7nTVz2tVY4,1532
30
+ azure/storage/blob/_generated/aio/operations/__init__.py,sha256=a5HiO2T3KzSSX8reO6fCwbKcwXqd0A6GIeF4t63XmTA,1181
31
+ azure/storage/blob/_generated/aio/operations/_append_blob_operations.py,sha256=Rp8uKv-wvm603nbDyMHgYSUrAn8vbXcMmHLl_t-4u-w,38523
32
+ azure/storage/blob/_generated/aio/operations/_blob_operations.py,sha256=nksrUWJlfQKN_FaL9p3v0QeCyix0hXRZyVC_Z9iE3WI,171991
33
+ azure/storage/blob/_generated/aio/operations/_block_blob_operations.py,sha256=7EjCSFea-lYZQyYrgi5pmGyfsFKHqH89suMiYmp_eeo,62874
34
+ azure/storage/blob/_generated/aio/operations/_container_operations.py,sha256=JHiriA4PHikK9VuqHqzd8nOckhtBqkqmqJUcw7mZR8M,92201
35
+ azure/storage/blob/_generated/aio/operations/_page_blob_operations.py,sha256=Ap2S3XfIId2IJQikVEMgGcYe0UvFugVG8dDmgLOSlss,76600
36
+ azure/storage/blob/_generated/aio/operations/_patch.py,sha256=pYl0jxVFr3Yu0RHRFIgN3NwFrEZr1uL-7xbEXGgJzBw,794
37
+ azure/storage/blob/_generated/aio/operations/_service_operations.py,sha256=BjQyysi0Qgu0byQjhvgF7myEPdUzAedZEil6eCW8B8s,36616
38
+ azure/storage/blob/_generated/models/__init__.py,sha256=qOh_WzGPNB7Do1XSXfRosHQJ94zx1G5dVXpZdkNKLuM,6303
39
+ azure/storage/blob/_generated/models/_azure_blob_storage_enums.py,sha256=5yADLYU9d2-QqzrvKPWszcaBWcMNgMUwCAYYUTyYix4,13146
40
+ azure/storage/blob/_generated/models/_models_py3.py,sha256=JXhdrOvO8VKo_Vhz-cqnXI1gfDf6nkrcBDC7Cz0rL_s,110612
41
+ azure/storage/blob/_generated/models/_patch.py,sha256=pYl0jxVFr3Yu0RHRFIgN3NwFrEZr1uL-7xbEXGgJzBw,794
42
+ azure/storage/blob/_generated/operations/__init__.py,sha256=a5HiO2T3KzSSX8reO6fCwbKcwXqd0A6GIeF4t63XmTA,1181
43
+ azure/storage/blob/_generated/operations/_append_blob_operations.py,sha256=M8bEqhMVGj9hXyUQoyrL2SplZmj248L6B81Imfow1yU,57655
44
+ azure/storage/blob/_generated/operations/_blob_operations.py,sha256=AGlKkkQXliAa9-TrznCjTvPHeEgWkZ6eeiCQJj4q8gI,239264
45
+ azure/storage/blob/_generated/operations/_block_blob_operations.py,sha256=z7vTKM41awI8ZnJ9c-lXppTE1RNbgdDHUt981xOOocE,94598
46
+ azure/storage/blob/_generated/operations/_container_operations.py,sha256=xdcWJcGiYUmW5BFjM7gQDKv9iz6Ngw9fvKVRivPz-Vo,129827
47
+ azure/storage/blob/_generated/operations/_page_blob_operations.py,sha256=mph50F8iwZlqqYW-REtyDEAhW4bSNUDMx7yHSStii5E,114459
48
+ azure/storage/blob/_generated/operations/_patch.py,sha256=pYl0jxVFr3Yu0RHRFIgN3NwFrEZr1uL-7xbEXGgJzBw,794
49
+ azure/storage/blob/_generated/operations/_service_operations.py,sha256=y4dFBV80_hvdVOFPZit_2eHi7MtbxBVj-i9oFjN-bk8,50474
50
+ azure/storage/blob/_shared/__init__.py,sha256=Ohb4NSCuB9VXGEqjU2o9VZ5L98-a7c8KWZvrujnSFk8,1477
51
+ azure/storage/blob/_shared/authentication.py,sha256=KfUKWkjItNJxUTWNcCNusYfnENy-XbVelHlZM8fWc0Y,9450
52
+ azure/storage/blob/_shared/base_client.py,sha256=f5EQ8LkggUWw4ihlRG87jbWRxAy35JjrDd2JN2gN4EY,18516
53
+ azure/storage/blob/_shared/base_client_async.py,sha256=cBL9V19-da0yX2KTJ8TMeg97IuYaKdk-6bGiDVpaD4Y,11850
54
+ azure/storage/blob/_shared/constants.py,sha256=0TnhBNEaZpVq0vECmLoXWSzCajtn9WOlfOfzbMApRb4,620
55
+ azure/storage/blob/_shared/models.py,sha256=hhTqxdmwoQgSFwM6MVxefW1MINquwP7hVg2wwgYc8io,25142
56
+ azure/storage/blob/_shared/parser.py,sha256=ACpdtwf6lhzmA0ukT3PmxpGVpimVXTy_mMSdixC55R8,1955
57
+ azure/storage/blob/_shared/policies.py,sha256=efaZtY3M0fzJj-bwBGCGrToOkZi-0DEk_FZ8DPgMVNs,30777
58
+ azure/storage/blob/_shared/policies_async.py,sha256=2qJHG9dkDLT2ecSfk5xNOobna-zp8VdUJ8pSf5KPJy4,13462
59
+ azure/storage/blob/_shared/request_handlers.py,sha256=LSsoITOE2JOdSUzB0iTdZAxwTH1EDtblcHeqcGlWjV8,9754
60
+ azure/storage/blob/_shared/response_handlers.py,sha256=S8S8RU2GCh5EtLdO_CjenzpDKexxa3y9FN60mXmML9o,9206
61
+ azure/storage/blob/_shared/shared_access_signature.py,sha256=ov8h9CStKwlfZBtlj54jeckpzuVjYcYvJNKgxQByZ9o,11130
62
+ azure/storage/blob/_shared/uploads.py,sha256=sNjyP-WqhDTbKHHJHezbY6Rac6KdhbUCqDGn1xD72Vk,22017
63
+ azure/storage/blob/_shared/uploads_async.py,sha256=5re4LvMHyIg8A2XgH0Rks-X1LUKBpYt6P7EgQfCWKaQ,16642
64
+ azure/storage/blob/_shared/avro/__init__.py,sha256=Ch-mWS2_vgonM9LjVaETdaW51OL6LfG23X-0tH2AFjw,310
65
+ azure/storage/blob/_shared/avro/avro_io.py,sha256=no2kWFVYxClP11e5fUypgDBW0YQcF9RgyuEy6rfgD6M,16054
66
+ azure/storage/blob/_shared/avro/avro_io_async.py,sha256=ui6Fw9wGVC6UjpvCj7r4wlp9i7XncNrukUN6TcZ_c5o,16195
67
+ azure/storage/blob/_shared/avro/datafile.py,sha256=L0xC3Na0Zyg-I6lZjW8Qp6R4wvEnGms35CAmNjh9oPU,8461
68
+ azure/storage/blob/_shared/avro/datafile_async.py,sha256=0fSi427XEDPXbFQNrVQq70EAhpy2-jo1Ay-k4fDHO3Q,7294
69
+ azure/storage/blob/_shared/avro/schema.py,sha256=ULeGU6lwC2Onzprt2nSnOwsjC3HJH-3S24eyPs6L6Us,36227
70
+ azure/storage/blob/aio/__init__.py,sha256=tVgeGWdfxG32uyJxAE32waysCOGt93S_EeuQLJz7vEM,8344
71
+ azure/storage/blob/aio/_blob_client_async.py,sha256=XZA_46l_aWbMB0eIM9OVDbIpl2G_-7j66vy7rBMWKdo,181808
72
+ azure/storage/blob/aio/_blob_service_client_async.py,sha256=D-y0VfSlg_K44VKgIGsYuySxkG1RBDF5ymz17D3P8CM,41179
73
+ azure/storage/blob/aio/_container_client_async.py,sha256=1D5ixfete8Y5uovMOreSgClHs6KqOSe38yhpZloMA84,85290
74
+ azure/storage/blob/aio/_download_async.py,sha256=zneaszZj69VblrUkWocBjvhvXedQJfJweL4uTqc9TpE,38078
75
+ azure/storage/blob/aio/_encryption_async.py,sha256=spbWeycNMj38H5ynZ03FRtRu0L0tnl1lQn5UJT6HMAY,2518
76
+ azure/storage/blob/aio/_lease_async.py,sha256=T31Augs9Rp-UdwsOOHzE5U_lUGcCD-fXnpnTHAZNE3A,18611
77
+ azure/storage/blob/aio/_list_blobs_helper.py,sha256=Cz8Cs76xu4j67OmKpED0RborDqTxcqBId7MlF5aRVVw,9851
78
+ azure/storage/blob/aio/_models.py,sha256=RQzmFX9SMRL-Wg2LxzI2Fjhjvrpn6yUJBEoIb-mgCAI,8057
79
+ azure/storage/blob/aio/_upload_helpers.py,sha256=zROsVN6PK2Cn59Ysq08Ide5T1IGG2yH7oK9ZCn5uQXs,14038
80
+ azure_storage_blob-12.24.0.dist-info/LICENSE,sha256=_VMkgdgo4ToLE8y1mOAjOKNhd0BnWoYu5r3BVBto6T0,1073
81
+ azure_storage_blob-12.24.0.dist-info/METADATA,sha256=EFpzqgJQ818SoFERG9ySWK5UvkarzN6bZ6RlGE1bd58,26224
82
+ azure_storage_blob-12.24.0.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
83
+ azure_storage_blob-12.24.0.dist-info/top_level.txt,sha256=S7DhWV9m80TBzAhOFjxDUiNbKszzoThbnrSz5MpbHSQ,6
84
+ azure_storage_blob-12.24.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.2.0)
2
+ Generator: setuptools (74.1.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5