azure-storage-blob 12.23.0b1__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 (54) 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 +8 -2
  5. azure/storage/blob/_container_client_helpers.py +11 -6
  6. azure/storage/blob/_deserialize.py +2 -2
  7. azure/storage/blob/_encryption.py +15 -10
  8. azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
  9. azure/storage/blob/_generated/_configuration.py +2 -2
  10. azure/storage/blob/_generated/_serialization.py +267 -150
  11. azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
  12. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +23 -11
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +137 -73
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +42 -16
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +49 -44
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +35 -23
  18. azure/storage/blob/_generated/aio/operations/_service_operations.py +30 -25
  19. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +35 -15
  21. azure/storage/blob/_generated/operations/_blob_operations.py +187 -98
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +64 -22
  23. azure/storage/blob/_generated/operations/_container_operations.py +67 -62
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -32
  25. azure/storage/blob/_generated/operations/_service_operations.py +38 -33
  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 +10 -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 +14 -16
  34. azure/storage/blob/_shared/policies_async.py +19 -6
  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 +10 -4
  44. azure/storage/blob/aio/_download_async.py +94 -71
  45. azure/storage/blob/aio/_lease_async.py +1 -1
  46. azure/storage/blob/aio/_list_blobs_helper.py +1 -2
  47. azure/storage/blob/aio/_models.py +1 -2
  48. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/METADATA +10 -10
  49. azure_storage_blob-12.24.0.dist-info/RECORD +84 -0
  50. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/WHEEL +1 -1
  51. azure/storage/blob/_generated/_vendor.py +0 -16
  52. azure_storage_blob-12.23.0b1.dist-info/RECORD +0 -85
  53. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/LICENSE +0 -0
  54. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/top_level.txt +0 -0
@@ -8,6 +8,7 @@
8
8
 
9
9
  from copy import deepcopy
10
10
  from typing import Any, Awaitable
11
+ from typing_extensions import Self
11
12
 
12
13
  from azure.core import AsyncPipelineClient
13
14
  from azure.core.pipeline import policies
@@ -47,7 +48,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
47
48
  :param base_url: Service URL. Required. Default value is "".
48
49
  :type base_url: str
49
50
  :keyword version: Specifies the version of the operation to use for this request. Default value
50
- is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
51
+ is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
51
52
  :paramtype version: str
52
53
  """
53
54
 
@@ -112,7 +113,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
112
113
  async def close(self) -> None:
113
114
  await self._client.close()
114
115
 
115
- async def __aenter__(self) -> "AzureBlobStorage":
116
+ async def __aenter__(self) -> Self:
116
117
  await self._client.__aenter__()
117
118
  return self
118
119
 
@@ -23,12 +23,12 @@ class AzureBlobStorageConfiguration: # pylint: disable=too-many-instance-attrib
23
23
  desired operation. Required.
24
24
  :type url: str
25
25
  :keyword version: Specifies the version of the operation to use for this request. Default value
26
- is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
26
+ is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
27
27
  :paramtype version: str
28
28
  """
29
29
 
30
30
  def __init__(self, url: str, **kwargs: Any) -> None:
31
- version: Literal["2024-08-04"] = kwargs.pop("version", "2024-08-04")
31
+ version: Literal["2025-01-05"] = kwargs.pop("version", "2025-01-05")
32
32
 
33
33
  if url is None:
34
34
  raise ValueError("Parameter 'url' must not be None.")
@@ -19,13 +19,11 @@ from azure.core.exceptions import (
19
19
  map_error,
20
20
  )
21
21
  from azure.core.pipeline import PipelineResponse
22
- from azure.core.pipeline.transport import AsyncHttpResponse
23
- from azure.core.rest import HttpRequest
22
+ from azure.core.rest import AsyncHttpResponse, HttpRequest
24
23
  from azure.core.tracing.decorator_async import distributed_trace_async
25
24
  from azure.core.utils import case_insensitive_dict
26
25
 
27
26
  from ... import models as _models
28
- from ..._vendor import _convert_request
29
27
  from ...operations._append_blob_operations import (
30
28
  build_append_block_from_url_request,
31
29
  build_append_block_request,
@@ -78,6 +76,7 @@ class AppendBlobOperations:
78
76
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
79
77
  **kwargs: Any
80
78
  ) -> None:
79
+ # pylint: disable=line-too-long
81
80
  """The Create Append Blob operation creates a new append blob.
82
81
 
83
82
  :param content_length: The length of the request. Required.
@@ -124,7 +123,7 @@ class AppendBlobOperations:
124
123
  :rtype: None
125
124
  :raises ~azure.core.exceptions.HttpResponseError:
126
125
  """
127
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
126
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
128
127
  401: ClientAuthenticationError,
129
128
  404: ResourceNotFoundError,
130
129
  409: ResourceExistsError,
@@ -207,7 +206,6 @@ class AppendBlobOperations:
207
206
  headers=_headers,
208
207
  params=_params,
209
208
  )
210
- _request = _convert_request(_request)
211
209
  _request.url = self._client.format_url(_request.url)
212
210
 
213
211
  _stream = False
@@ -255,6 +253,8 @@ class AppendBlobOperations:
255
253
  transactional_content_md5: Optional[bytes] = None,
256
254
  transactional_content_crc64: Optional[bytes] = None,
257
255
  request_id_parameter: Optional[str] = None,
256
+ structured_body_type: Optional[str] = None,
257
+ structured_content_length: Optional[int] = None,
258
258
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
259
259
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
260
260
  cpk_info: Optional[_models.CpkInfo] = None,
@@ -262,6 +262,7 @@ class AppendBlobOperations:
262
262
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
263
263
  **kwargs: Any
264
264
  ) -> None:
265
+ # pylint: disable=line-too-long
265
266
  """The Append Block operation commits a new block of data to the end of an existing append blob.
266
267
  The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
267
268
  AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
@@ -285,6 +286,13 @@ class AppendBlobOperations:
285
286
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
286
287
  value is None.
287
288
  :type request_id_parameter: str
289
+ :param structured_body_type: Required if the request body is a structured message. Specifies
290
+ the message schema version and properties. Default value is None.
291
+ :type structured_body_type: str
292
+ :param structured_content_length: Required if the request body is a structured message.
293
+ Specifies the length of the blob/file content inside the message body. Will always be smaller
294
+ than Content-Length. Default value is None.
295
+ :type structured_content_length: int
288
296
  :param lease_access_conditions: Parameter group. Default value is None.
289
297
  :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
290
298
  :param append_position_access_conditions: Parameter group. Default value is None.
@@ -300,7 +308,7 @@ class AppendBlobOperations:
300
308
  :rtype: None
301
309
  :raises ~azure.core.exceptions.HttpResponseError:
302
310
  """
303
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
311
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
304
312
  401: ClientAuthenticationError,
305
313
  404: ResourceNotFoundError,
306
314
  409: ResourceExistsError,
@@ -365,6 +373,8 @@ class AppendBlobOperations:
365
373
  if_none_match=_if_none_match,
366
374
  if_tags=_if_tags,
367
375
  request_id_parameter=request_id_parameter,
376
+ structured_body_type=structured_body_type,
377
+ structured_content_length=structured_content_length,
368
378
  comp=comp,
369
379
  content_type=content_type,
370
380
  version=self._config.version,
@@ -372,7 +382,6 @@ class AppendBlobOperations:
372
382
  headers=_headers,
373
383
  params=_params,
374
384
  )
375
- _request = _convert_request(_request)
376
385
  _request.url = self._client.format_url(_request.url)
377
386
 
378
387
  _stream = False
@@ -415,6 +424,9 @@ class AppendBlobOperations:
415
424
  response_headers["x-ms-encryption-scope"] = self._deserialize(
416
425
  "str", response.headers.get("x-ms-encryption-scope")
417
426
  )
427
+ response_headers["x-ms-structured-body"] = self._deserialize(
428
+ "str", response.headers.get("x-ms-structured-body")
429
+ )
418
430
 
419
431
  if cls:
420
432
  return cls(pipeline_response, None, response_headers) # type: ignore
@@ -439,6 +451,7 @@ class AppendBlobOperations:
439
451
  source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
440
452
  **kwargs: Any
441
453
  ) -> None:
454
+ # pylint: disable=line-too-long
442
455
  """The Append Block operation commits a new block of data to the end of an existing append blob
443
456
  where the contents are read from a source url. The Append Block operation is permitted only if
444
457
  the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on
@@ -489,7 +502,7 @@ class AppendBlobOperations:
489
502
  :rtype: None
490
503
  :raises ~azure.core.exceptions.HttpResponseError:
491
504
  """
492
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
505
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
493
506
  401: ClientAuthenticationError,
494
507
  404: ResourceNotFoundError,
495
508
  409: ResourceExistsError,
@@ -574,7 +587,6 @@ class AppendBlobOperations:
574
587
  headers=_headers,
575
588
  params=_params,
576
589
  )
577
- _request = _convert_request(_request)
578
590
  _request.url = self._client.format_url(_request.url)
579
591
 
580
592
  _stream = False
@@ -628,6 +640,7 @@ class AppendBlobOperations:
628
640
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
629
641
  **kwargs: Any
630
642
  ) -> None:
643
+ # pylint: disable=line-too-long
631
644
  """The Seal operation seals the Append Blob to make it read-only. Seal is supported only on
632
645
  version 2019-12-12 version or later.
633
646
 
@@ -651,7 +664,7 @@ class AppendBlobOperations:
651
664
  :rtype: None
652
665
  :raises ~azure.core.exceptions.HttpResponseError:
653
666
  """
654
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
667
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
655
668
  401: ClientAuthenticationError,
656
669
  404: ResourceNotFoundError,
657
670
  409: ResourceExistsError,
@@ -696,7 +709,6 @@ class AppendBlobOperations:
696
709
  headers=_headers,
697
710
  params=_params,
698
711
  )
699
- _request = _convert_request(_request)
700
712
  _request.url = self._client.format_url(_request.url)
701
713
 
702
714
  _stream = False