azure-storage-blob 12.25.1__py3-none-any.whl → 12.27.0b1__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 (67) hide show
  1. azure/storage/blob/__init__.py +3 -2
  2. azure/storage/blob/_blob_client.py +94 -41
  3. azure/storage/blob/_blob_client_helpers.py +19 -4
  4. azure/storage/blob/_blob_service_client.py +16 -13
  5. azure/storage/blob/_container_client.py +25 -22
  6. azure/storage/blob/_deserialize.py +1 -1
  7. azure/storage/blob/_download.py +7 -7
  8. azure/storage/blob/_encryption.py +177 -184
  9. azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
  10. azure/storage/blob/_generated/_configuration.py +2 -2
  11. azure/storage/blob/_generated/_utils/__init__.py +6 -0
  12. azure/storage/blob/_generated/{_serialization.py → _utils/serialization.py} +7 -25
  13. azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
  14. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  15. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +11 -14
  16. azure/storage/blob/_generated/aio/operations/_blob_operations.py +40 -64
  17. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +18 -20
  18. azure/storage/blob/_generated/aio/operations/_container_operations.py +21 -43
  19. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +18 -27
  20. azure/storage/blob/_generated/aio/operations/_service_operations.py +11 -22
  21. azure/storage/blob/_generated/models/__init__.py +2 -0
  22. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +6 -0
  23. azure/storage/blob/_generated/models/_models_py3.py +30 -9
  24. azure/storage/blob/_generated/operations/_append_blob_operations.py +19 -20
  25. azure/storage/blob/_generated/operations/_blob_operations.py +68 -89
  26. azure/storage/blob/_generated/operations/_block_blob_operations.py +31 -27
  27. azure/storage/blob/_generated/operations/_container_operations.py +40 -62
  28. azure/storage/blob/_generated/operations/_page_blob_operations.py +31 -37
  29. azure/storage/blob/_generated/operations/_service_operations.py +20 -32
  30. azure/storage/blob/_lease.py +1 -0
  31. azure/storage/blob/_list_blobs_helper.py +1 -1
  32. azure/storage/blob/_quick_query_helper.py +20 -24
  33. azure/storage/blob/_serialize.py +2 -0
  34. azure/storage/blob/_shared/__init__.py +7 -7
  35. azure/storage/blob/_shared/authentication.py +49 -32
  36. azure/storage/blob/_shared/avro/avro_io.py +44 -42
  37. azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
  38. azure/storage/blob/_shared/avro/datafile.py +24 -21
  39. azure/storage/blob/_shared/avro/datafile_async.py +15 -15
  40. azure/storage/blob/_shared/avro/schema.py +196 -217
  41. azure/storage/blob/_shared/base_client.py +82 -59
  42. azure/storage/blob/_shared/base_client_async.py +58 -51
  43. azure/storage/blob/_shared/constants.py +1 -1
  44. azure/storage/blob/_shared/models.py +94 -92
  45. azure/storage/blob/_shared/parser.py +3 -3
  46. azure/storage/blob/_shared/policies.py +186 -147
  47. azure/storage/blob/_shared/policies_async.py +53 -65
  48. azure/storage/blob/_shared/request_handlers.py +50 -45
  49. azure/storage/blob/_shared/response_handlers.py +54 -45
  50. azure/storage/blob/_shared/shared_access_signature.py +67 -71
  51. azure/storage/blob/_shared/uploads.py +56 -49
  52. azure/storage/blob/_shared/uploads_async.py +70 -58
  53. azure/storage/blob/_shared_access_signature.py +3 -1
  54. azure/storage/blob/_version.py +1 -1
  55. azure/storage/blob/aio/__init__.py +3 -2
  56. azure/storage/blob/aio/_blob_client_async.py +241 -44
  57. azure/storage/blob/aio/_blob_service_client_async.py +13 -11
  58. azure/storage/blob/aio/_container_client_async.py +28 -25
  59. azure/storage/blob/aio/_download_async.py +7 -7
  60. azure/storage/blob/aio/_lease_async.py +1 -0
  61. azure/storage/blob/aio/_quick_query_helper_async.py +194 -0
  62. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/METADATA +4 -5
  63. azure_storage_blob-12.27.0b1.dist-info/RECORD +86 -0
  64. azure_storage_blob-12.25.1.dist-info/RECORD +0 -84
  65. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/LICENSE +0 -0
  66. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/WHEEL +0 -0
  67. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/top_level.txt +0 -0
@@ -16,7 +16,7 @@ from azure.core.rest import HttpRequest, HttpResponse
16
16
 
17
17
  from . import models as _models
18
18
  from ._configuration import AzureBlobStorageConfiguration
19
- from ._serialization import Deserializer, Serializer
19
+ from ._utils.serialization import Deserializer, Serializer
20
20
  from .operations import (
21
21
  AppendBlobOperations,
22
22
  BlobOperations,
@@ -48,7 +48,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
48
48
  :param base_url: Service URL. Required. Default value is "".
49
49
  :type base_url: str
50
50
  :keyword version: Specifies the version of the operation to use for this request. Default value
51
- is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
51
+ is "2025-11-05". Note that overriding this default value may result in unsupported behavior.
52
52
  :paramtype version: str
53
53
  """
54
54
 
@@ -56,6 +56,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
56
56
  self, url: str, base_url: str = "", **kwargs: Any
57
57
  ) -> None:
58
58
  self._config = AzureBlobStorageConfiguration(url=url, **kwargs)
59
+
59
60
  _policies = kwargs.pop("policies", None)
60
61
  if _policies is None:
61
62
  _policies = [
@@ -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 "2025-01-05". Note that overriding this default value may result in unsupported behavior.
26
+ is "2025-11-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["2025-01-05"] = kwargs.pop("version", "2025-01-05")
31
+ version: Literal["2025-11-05"] = kwargs.pop("version", "2025-11-05")
32
32
 
33
33
  if url is None:
34
34
  raise ValueError("Parameter 'url' must not be None.")
@@ -0,0 +1,6 @@
1
+ # --------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+ # Code generated by Microsoft (R) AutoRest Code Generator.
5
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
+ # --------------------------------------------------------------------------
@@ -1,28 +1,10 @@
1
- # pylint: disable=too-many-lines
1
+ # pylint: disable=line-too-long,useless-suppression,too-many-lines
2
+ # coding=utf-8
2
3
  # --------------------------------------------------------------------------
3
- #
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
5
- #
6
- # The MIT License (MIT)
7
- #
8
- # Permission is hereby granted, free of charge, to any person obtaining a copy
9
- # of this software and associated documentation files (the ""Software""), to
10
- # deal in the Software without restriction, including without limitation the
11
- # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12
- # sell copies of the Software, and to permit persons to whom the Software is
13
- # furnished to do so, subject to the following conditions:
14
- #
15
- # The above copyright notice and this permission notice shall be included in
16
- # all copies or substantial portions of the Software.
17
- #
18
- # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24
- # IN THE SOFTWARE.
25
- #
5
+ # Licensed under the MIT License. See License.txt in the project root for license information.
6
+ # Code generated by Microsoft (R) AutoRest Code Generator.
7
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
26
8
  # --------------------------------------------------------------------------
27
9
 
28
10
  # pyright: reportUnnecessaryTypeIgnoreComment=false
@@ -411,7 +393,7 @@ class Model:
411
393
  :param function key_extractors: A key extractor function.
412
394
  :param str content_type: JSON by default, set application/xml if XML.
413
395
  :returns: An instance of this model
414
- :raises: DeserializationError if something went wrong
396
+ :raises DeserializationError: if something went wrong
415
397
  :rtype: Self
416
398
  """
417
399
  deserializer = Deserializer(cls._infer_class_models())
@@ -1361,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
1361
1343
  # Iter and wrapped, should have found one node only (the wrap one)
1362
1344
  if len(children) != 1:
1363
1345
  raise DeserializationError(
1364
- "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
1346
+ "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
1365
1347
  xml_name
1366
1348
  )
1367
1349
  )
@@ -15,7 +15,7 @@ from azure.core.pipeline import policies
15
15
  from azure.core.rest import AsyncHttpResponse, HttpRequest
16
16
 
17
17
  from .. import models as _models
18
- from .._serialization import Deserializer, Serializer
18
+ from .._utils.serialization import Deserializer, Serializer
19
19
  from ._configuration import AzureBlobStorageConfiguration
20
20
  from .operations import (
21
21
  AppendBlobOperations,
@@ -48,7 +48,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
48
48
  :param base_url: Service URL. Required. Default value is "".
49
49
  :type base_url: str
50
50
  :keyword version: Specifies the version of the operation to use for this request. Default value
51
- is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
51
+ is "2025-11-05". Note that overriding this default value may result in unsupported behavior.
52
52
  :paramtype version: str
53
53
  """
54
54
 
@@ -56,6 +56,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
56
56
  self, url: str, base_url: str = "", **kwargs: Any
57
57
  ) -> None:
58
58
  self._config = AzureBlobStorageConfiguration(url=url, **kwargs)
59
+
59
60
  _policies = kwargs.pop("policies", None)
60
61
  if _policies is None:
61
62
  _policies = [
@@ -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 "2025-01-05". Note that overriding this default value may result in unsupported behavior.
26
+ is "2025-11-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["2025-01-05"] = kwargs.pop("version", "2025-01-05")
31
+ version: Literal["2025-11-05"] = kwargs.pop("version", "2025-11-05")
32
32
 
33
33
  if url is None:
34
34
  raise ValueError("Parameter 'url' must not be None.")
@@ -1,3 +1,4 @@
1
+ # pylint: disable=line-too-long,useless-suppression
1
2
  # coding=utf-8
2
3
  # --------------------------------------------------------------------------
3
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5,8 +6,8 @@
5
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
  # --------------------------------------------------------------------------
9
+ from collections.abc import MutableMapping
8
10
  import datetime
9
- import sys
10
11
  from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
11
12
 
12
13
  from azure.core import AsyncPipelineClient
@@ -24,7 +25,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
24
25
  from azure.core.utils import case_insensitive_dict
25
26
 
26
27
  from ... import models as _models
27
- from ..._serialization import Deserializer, Serializer
28
+ from ..._utils.serialization import Deserializer, Serializer
28
29
  from ...operations._append_blob_operations import (
29
30
  build_append_block_from_url_request,
30
31
  build_append_block_request,
@@ -33,10 +34,6 @@ from ...operations._append_blob_operations import (
33
34
  )
34
35
  from .._configuration import AzureBlobStorageConfiguration
35
36
 
36
- if sys.version_info >= (3, 9):
37
- from collections.abc import MutableMapping
38
- else:
39
- from typing import MutableMapping # type: ignore
40
37
  T = TypeVar("T")
41
38
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
39
 
@@ -78,14 +75,13 @@ class AppendBlobOperations:
78
75
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
79
76
  **kwargs: Any
80
77
  ) -> None:
81
- # pylint: disable=line-too-long
82
78
  """The Create Append Blob operation creates a new append blob.
83
79
 
84
80
  :param content_length: The length of the request. Required.
85
81
  :type content_length: int
86
82
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
87
83
  :code:`<a
88
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
84
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
89
85
  Timeouts for Blob Service Operations.</a>`. Default value is None.
90
86
  :type timeout: int
91
87
  :param metadata: Optional. Specifies a user-defined name-value pair associated with the blob.
@@ -264,7 +260,6 @@ class AppendBlobOperations:
264
260
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
265
261
  **kwargs: Any
266
262
  ) -> None:
267
- # pylint: disable=line-too-long
268
263
  """The Append Block operation commits a new block of data to the end of an existing append blob.
269
264
  The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
270
265
  AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
@@ -275,7 +270,7 @@ class AppendBlobOperations:
275
270
  :type body: IO[bytes]
276
271
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
277
272
  :code:`<a
278
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
273
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
279
274
  Timeouts for Blob Service Operations.</a>`. Default value is None.
280
275
  :type timeout: int
281
276
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -445,6 +440,7 @@ class AppendBlobOperations:
445
440
  transactional_content_md5: Optional[bytes] = None,
446
441
  request_id_parameter: Optional[str] = None,
447
442
  copy_source_authorization: Optional[str] = None,
443
+ file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
448
444
  cpk_info: Optional[_models.CpkInfo] = None,
449
445
  cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
450
446
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
@@ -453,7 +449,6 @@ class AppendBlobOperations:
453
449
  source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
454
450
  **kwargs: Any
455
451
  ) -> None:
456
- # pylint: disable=line-too-long
457
452
  """The Append Block operation commits a new block of data to the end of an existing append blob
458
453
  where the contents are read from a source url. The Append Block operation is permitted only if
459
454
  the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on
@@ -473,7 +468,7 @@ class AppendBlobOperations:
473
468
  :type source_contentcrc64: bytes
474
469
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
475
470
  :code:`<a
476
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
471
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
477
472
  Timeouts for Blob Service Operations.</a>`. Default value is None.
478
473
  :type timeout: int
479
474
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -486,6 +481,8 @@ class AppendBlobOperations:
486
481
  :param copy_source_authorization: Only Bearer type is supported. Credentials should be a valid
487
482
  OAuth access token to copy source. Default value is None.
488
483
  :type copy_source_authorization: str
484
+ :param file_request_intent: Valid value is backup. "backup" Default value is None.
485
+ :type file_request_intent: str or ~azure.storage.blob.models.FileShareTokenIntent
489
486
  :param cpk_info: Parameter group. Default value is None.
490
487
  :type cpk_info: ~azure.storage.blob.models.CpkInfo
491
488
  :param cpk_scope_info: Parameter group. Default value is None.
@@ -584,6 +581,7 @@ class AppendBlobOperations:
584
581
  source_if_none_match=_source_if_none_match,
585
582
  request_id_parameter=request_id_parameter,
586
583
  copy_source_authorization=copy_source_authorization,
584
+ file_request_intent=file_request_intent,
587
585
  comp=comp,
588
586
  version=self._config.version,
589
587
  headers=_headers,
@@ -642,13 +640,12 @@ class AppendBlobOperations:
642
640
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
643
641
  **kwargs: Any
644
642
  ) -> None:
645
- # pylint: disable=line-too-long
646
643
  """The Seal operation seals the Append Blob to make it read-only. Seal is supported only on
647
644
  version 2019-12-12 version or later.
648
645
 
649
646
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
650
647
  :code:`<a
651
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
648
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
652
649
  Timeouts for Blob Service Operations.</a>`. Default value is None.
653
650
  :type timeout: int
654
651
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character