azure-storage-blob 12.24.1__py3-none-any.whl → 12.25.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 (33) hide show
  1. azure/storage/blob/_generated/__init__.py +9 -3
  2. azure/storage/blob/_generated/_configuration.py +1 -1
  3. azure/storage/blob/_generated/_patch.py +16 -29
  4. azure/storage/blob/_generated/_serialization.py +52 -117
  5. azure/storage/blob/_generated/aio/__init__.py +9 -3
  6. azure/storage/blob/_generated/aio/_configuration.py +1 -1
  7. azure/storage/blob/_generated/aio/_patch.py +16 -29
  8. azure/storage/blob/_generated/aio/operations/__init__.py +14 -8
  9. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +21 -19
  10. azure/storage/blob/_generated/aio/operations/_blob_operations.py +88 -85
  11. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +28 -25
  12. azure/storage/blob/_generated/aio/operations/_container_operations.py +59 -56
  13. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +37 -34
  14. azure/storage/blob/_generated/aio/operations/_patch.py +2 -8
  15. azure/storage/blob/_generated/aio/operations/_service_operations.py +27 -25
  16. azure/storage/blob/_generated/models/__init__.py +91 -80
  17. azure/storage/blob/_generated/models/_models_py3.py +4 -5
  18. azure/storage/blob/_generated/models/_patch.py +2 -8
  19. azure/storage/blob/_generated/operations/__init__.py +14 -8
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +18 -16
  21. azure/storage/blob/_generated/operations/_blob_operations.py +67 -65
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +23 -21
  23. azure/storage/blob/_generated/operations/_container_operations.py +46 -44
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +30 -28
  25. azure/storage/blob/_generated/operations/_patch.py +2 -8
  26. azure/storage/blob/_generated/operations/_service_operations.py +26 -24
  27. azure/storage/blob/_serialize.py +1 -0
  28. azure/storage/blob/_version.py +1 -1
  29. {azure_storage_blob-12.24.1.dist-info → azure_storage_blob-12.25.0.dist-info}/METADATA +2 -2
  30. {azure_storage_blob-12.24.1.dist-info → azure_storage_blob-12.25.0.dist-info}/RECORD +33 -33
  31. {azure_storage_blob-12.24.1.dist-info → azure_storage_blob-12.25.0.dist-info}/LICENSE +0 -0
  32. {azure_storage_blob-12.24.1.dist-info → azure_storage_blob-12.25.0.dist-info}/WHEEL +0 -0
  33. {azure_storage_blob-12.24.1.dist-info → azure_storage_blob-12.25.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- # pylint: disable=too-many-lines,too-many-statements
1
+ # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,8 +8,9 @@
8
8
  # --------------------------------------------------------------------------
9
9
  import datetime
10
10
  import sys
11
- from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union
11
+ from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
12
12
 
13
+ from azure.core import AsyncPipelineClient
13
14
  from azure.core.exceptions import (
14
15
  ClientAuthenticationError,
15
16
  HttpResponseError,
@@ -24,6 +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
28
+ from ..._serialization import Deserializer, Serializer
27
29
  from ...operations._block_blob_operations import (
28
30
  build_commit_block_list_request,
29
31
  build_get_block_list_request,
@@ -32,11 +34,12 @@ from ...operations._block_blob_operations import (
32
34
  build_stage_block_request,
33
35
  build_upload_request,
34
36
  )
37
+ from .._configuration import AzureBlobStorageConfiguration
35
38
 
36
39
  if sys.version_info >= (3, 9):
37
40
  from collections.abc import MutableMapping
38
41
  else:
39
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
42
+ from typing import MutableMapping # type: ignore
40
43
  T = TypeVar("T")
41
44
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
45
 
@@ -55,13 +58,13 @@ class BlockBlobOperations:
55
58
 
56
59
  def __init__(self, *args, **kwargs) -> None:
57
60
  input_args = list(args)
58
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
59
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
60
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
61
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
61
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
62
+ self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
63
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
64
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
62
65
 
63
66
  @distributed_trace_async
64
- async def upload( # pylint: disable=inconsistent-return-statements
67
+ async def upload(
65
68
  self,
66
69
  content_length: int,
67
70
  body: IO[bytes],
@@ -97,7 +100,7 @@ class BlockBlobOperations:
97
100
  :type body: IO[bytes]
98
101
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
99
102
  :code:`<a
100
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
103
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
101
104
  Timeouts for Blob Service Operations.</a>`. Default value is None.
102
105
  :type timeout: int
103
106
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -154,7 +157,7 @@ class BlockBlobOperations:
154
157
  :rtype: None
155
158
  :raises ~azure.core.exceptions.HttpResponseError:
156
159
  """
157
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
160
+ error_map: MutableMapping = {
158
161
  401: ClientAuthenticationError,
159
162
  404: ResourceNotFoundError,
160
163
  409: ResourceExistsError,
@@ -288,7 +291,7 @@ class BlockBlobOperations:
288
291
  return cls(pipeline_response, None, response_headers) # type: ignore
289
292
 
290
293
  @distributed_trace_async
291
- async def put_blob_from_url( # pylint: disable=inconsistent-return-statements
294
+ async def put_blob_from_url(
292
295
  self,
293
296
  content_length: int,
294
297
  copy_source: str,
@@ -326,7 +329,7 @@ class BlockBlobOperations:
326
329
  :type copy_source: str
327
330
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
328
331
  :code:`<a
329
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
332
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
330
333
  Timeouts for Blob Service Operations.</a>`. Default value is None.
331
334
  :type timeout: int
332
335
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -381,7 +384,7 @@ class BlockBlobOperations:
381
384
  :rtype: None
382
385
  :raises ~azure.core.exceptions.HttpResponseError:
383
386
  """
384
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
387
+ error_map: MutableMapping = {
385
388
  401: ClientAuthenticationError,
386
389
  404: ResourceNotFoundError,
387
390
  409: ResourceExistsError,
@@ -523,7 +526,7 @@ class BlockBlobOperations:
523
526
  return cls(pipeline_response, None, response_headers) # type: ignore
524
527
 
525
528
  @distributed_trace_async
526
- async def stage_block( # pylint: disable=inconsistent-return-statements
529
+ async def stage_block(
527
530
  self,
528
531
  block_id: str,
529
532
  content_length: int,
@@ -558,7 +561,7 @@ class BlockBlobOperations:
558
561
  :type transactional_content_crc64: bytes
559
562
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
560
563
  :code:`<a
561
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
564
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
562
565
  Timeouts for Blob Service Operations.</a>`. Default value is None.
563
566
  :type timeout: int
564
567
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -582,7 +585,7 @@ class BlockBlobOperations:
582
585
  :rtype: None
583
586
  :raises ~azure.core.exceptions.HttpResponseError:
584
587
  """
585
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
588
+ error_map: MutableMapping = {
586
589
  401: ClientAuthenticationError,
587
590
  404: ResourceNotFoundError,
588
591
  409: ResourceExistsError,
@@ -676,7 +679,7 @@ class BlockBlobOperations:
676
679
  return cls(pipeline_response, None, response_headers) # type: ignore
677
680
 
678
681
  @distributed_trace_async
679
- async def stage_block_from_url( # pylint: disable=inconsistent-return-statements
682
+ async def stage_block_from_url(
680
683
  self,
681
684
  block_id: str,
682
685
  content_length: int,
@@ -715,7 +718,7 @@ class BlockBlobOperations:
715
718
  :type source_contentcrc64: bytes
716
719
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
717
720
  :code:`<a
718
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
721
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
719
722
  Timeouts for Blob Service Operations.</a>`. Default value is None.
720
723
  :type timeout: int
721
724
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -738,7 +741,7 @@ class BlockBlobOperations:
738
741
  :rtype: None
739
742
  :raises ~azure.core.exceptions.HttpResponseError:
740
743
  """
741
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
744
+ error_map: MutableMapping = {
742
745
  401: ClientAuthenticationError,
743
746
  404: ResourceNotFoundError,
744
747
  409: ResourceExistsError,
@@ -839,7 +842,7 @@ class BlockBlobOperations:
839
842
  return cls(pipeline_response, None, response_headers) # type: ignore
840
843
 
841
844
  @distributed_trace_async
842
- async def commit_block_list( # pylint: disable=inconsistent-return-statements
845
+ async def commit_block_list(
843
846
  self,
844
847
  blocks: _models.BlockLookupList,
845
848
  timeout: Optional[int] = None,
@@ -872,7 +875,7 @@ class BlockBlobOperations:
872
875
  :type blocks: ~azure.storage.blob.models.BlockLookupList
873
876
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
874
877
  :code:`<a
875
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
878
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
876
879
  Timeouts for Blob Service Operations.</a>`. Default value is None.
877
880
  :type timeout: int
878
881
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -922,7 +925,7 @@ class BlockBlobOperations:
922
925
  :rtype: None
923
926
  :raises ~azure.core.exceptions.HttpResponseError:
924
927
  """
925
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
928
+ error_map: MutableMapping = {
926
929
  401: ClientAuthenticationError,
927
930
  404: ResourceNotFoundError,
928
931
  409: ResourceExistsError,
@@ -1070,7 +1073,7 @@ class BlockBlobOperations:
1070
1073
  :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
1071
1074
  specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
1072
1075
  see :code:`<a
1073
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
1076
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
1074
1077
  a Snapshot of a Blob.</a>`. Default value is None.
1075
1078
  :type snapshot: str
1076
1079
  :param list_type: Specifies whether to return the list of committed blocks, the list of
@@ -1079,7 +1082,7 @@ class BlockBlobOperations:
1079
1082
  :type list_type: str or ~azure.storage.blob.models.BlockListType
1080
1083
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
1081
1084
  :code:`<a
1082
- href="https://learn.microsoft.com/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1085
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1083
1086
  Timeouts for Blob Service Operations.</a>`. Default value is None.
1084
1087
  :type timeout: int
1085
1088
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -1094,7 +1097,7 @@ class BlockBlobOperations:
1094
1097
  :rtype: ~azure.storage.blob.models.BlockList
1095
1098
  :raises ~azure.core.exceptions.HttpResponseError:
1096
1099
  """
1097
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1100
+ error_map: MutableMapping = {
1098
1101
  401: ClientAuthenticationError,
1099
1102
  404: ResourceNotFoundError,
1100
1103
  409: ResourceExistsError,