azure-storage-blob 12.26.0b1__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.
- azure/storage/blob/__init__.py +3 -2
- azure/storage/blob/_blob_client.py +43 -38
- azure/storage/blob/_blob_client_helpers.py +4 -3
- azure/storage/blob/_blob_service_client.py +16 -13
- azure/storage/blob/_container_client.py +25 -22
- azure/storage/blob/_deserialize.py +1 -1
- azure/storage/blob/_download.py +7 -7
- azure/storage/blob/_encryption.py +177 -184
- azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/_configuration.py +2 -2
- azure/storage/blob/_generated/_utils/__init__.py +6 -0
- azure/storage/blob/_generated/{_serialization.py → _utils/serialization.py} +4 -22
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/aio/_configuration.py +2 -2
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +6 -10
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +35 -39
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +9 -13
- azure/storage/blob/_generated/aio/operations/_container_operations.py +20 -24
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +13 -17
- azure/storage/blob/_generated/aio/operations/_service_operations.py +10 -14
- azure/storage/blob/_generated/models/_models_py3.py +30 -9
- azure/storage/blob/_generated/operations/_append_blob_operations.py +11 -15
- azure/storage/blob/_generated/operations/_blob_operations.py +60 -64
- azure/storage/blob/_generated/operations/_block_blob_operations.py +16 -20
- azure/storage/blob/_generated/operations/_container_operations.py +39 -43
- azure/storage/blob/_generated/operations/_page_blob_operations.py +23 -27
- azure/storage/blob/_generated/operations/_service_operations.py +19 -23
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_list_blobs_helper.py +1 -1
- azure/storage/blob/_quick_query_helper.py +3 -3
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/__init__.py +7 -7
- azure/storage/blob/_shared/authentication.py +49 -32
- azure/storage/blob/_shared/avro/avro_io.py +44 -42
- azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
- azure/storage/blob/_shared/avro/datafile.py +24 -21
- azure/storage/blob/_shared/avro/datafile_async.py +15 -15
- azure/storage/blob/_shared/avro/schema.py +196 -217
- azure/storage/blob/_shared/base_client.py +81 -59
- azure/storage/blob/_shared/base_client_async.py +58 -51
- azure/storage/blob/_shared/constants.py +1 -1
- azure/storage/blob/_shared/models.py +94 -92
- azure/storage/blob/_shared/parser.py +3 -3
- azure/storage/blob/_shared/policies.py +186 -147
- azure/storage/blob/_shared/policies_async.py +53 -65
- azure/storage/blob/_shared/request_handlers.py +50 -45
- azure/storage/blob/_shared/response_handlers.py +54 -45
- azure/storage/blob/_shared/shared_access_signature.py +65 -73
- azure/storage/blob/_shared/uploads.py +56 -49
- azure/storage/blob/_shared/uploads_async.py +70 -58
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +3 -2
- azure/storage/blob/aio/_blob_client_async.py +53 -40
- azure/storage/blob/aio/_blob_service_client_async.py +13 -11
- azure/storage/blob/aio/_container_client_async.py +28 -25
- azure/storage/blob/aio/_download_async.py +7 -7
- azure/storage/blob/aio/_lease_async.py +1 -0
- azure/storage/blob/aio/_quick_query_helper_async.py +3 -3
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/METADATA +3 -4
- azure_storage_blob-12.27.0b1.dist-info/RECORD +86 -0
- azure_storage_blob-12.26.0b1.dist-info/RECORD +0 -85
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/WHEEL +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/top_level.txt +0 -0
@@ -6,8 +6,8 @@
|
|
6
6
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
|
+
from collections.abc import MutableMapping
|
9
10
|
import datetime
|
10
|
-
import sys
|
11
11
|
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
|
12
12
|
|
13
13
|
from azure.core import PipelineClient
|
@@ -26,12 +26,8 @@ from azure.core.utils import case_insensitive_dict
|
|
26
26
|
|
27
27
|
from .. import models as _models
|
28
28
|
from .._configuration import AzureBlobStorageConfiguration
|
29
|
-
from ..
|
29
|
+
from .._utils.serialization import Deserializer, Serializer
|
30
30
|
|
31
|
-
if sys.version_info >= (3, 9):
|
32
|
-
from collections.abc import MutableMapping
|
33
|
-
else:
|
34
|
-
from typing import MutableMapping # type: ignore
|
35
31
|
T = TypeVar("T")
|
36
32
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
33
|
|
@@ -75,7 +71,7 @@ def build_create_request(
|
|
75
71
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
76
72
|
|
77
73
|
blob_type: Literal["PageBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "PageBlob"))
|
78
|
-
version: Literal["2025-
|
74
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
79
75
|
accept = _headers.pop("Accept", "application/xml")
|
80
76
|
|
81
77
|
# Construct URL
|
@@ -193,7 +189,7 @@ def build_upload_pages_request(
|
|
193
189
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
194
190
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
195
191
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
196
|
-
version: Literal["2025-
|
192
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
197
193
|
accept = _headers.pop("Accept", "application/xml")
|
198
194
|
|
199
195
|
# Construct URL
|
@@ -299,7 +295,7 @@ def build_clear_pages_request(
|
|
299
295
|
|
300
296
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
301
297
|
page_write: Literal["clear"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "clear"))
|
302
|
-
version: Literal["2025-
|
298
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
303
299
|
accept = _headers.pop("Accept", "application/xml")
|
304
300
|
|
305
301
|
# Construct URL
|
@@ -399,7 +395,7 @@ def build_upload_pages_from_url_request(
|
|
399
395
|
|
400
396
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
401
397
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
402
|
-
version: Literal["2025-
|
398
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
403
399
|
accept = _headers.pop("Accept", "application/xml")
|
404
400
|
|
405
401
|
# Construct URL
|
@@ -508,7 +504,7 @@ def build_get_page_ranges_request(
|
|
508
504
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
509
505
|
|
510
506
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
511
|
-
version: Literal["2025-
|
507
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
512
508
|
accept = _headers.pop("Accept", "application/xml")
|
513
509
|
|
514
510
|
# Construct URL
|
@@ -576,7 +572,7 @@ def build_get_page_ranges_diff_request(
|
|
576
572
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
577
573
|
|
578
574
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
579
|
-
version: Literal["2025-
|
575
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
580
576
|
accept = _headers.pop("Accept", "application/xml")
|
581
577
|
|
582
578
|
# Construct URL
|
@@ -647,7 +643,7 @@ def build_resize_request(
|
|
647
643
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
648
644
|
|
649
645
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
650
|
-
version: Literal["2025-
|
646
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
651
647
|
accept = _headers.pop("Accept", "application/xml")
|
652
648
|
|
653
649
|
# Construct URL
|
@@ -714,7 +710,7 @@ def build_update_sequence_number_request(
|
|
714
710
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
715
711
|
|
716
712
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
717
|
-
version: Literal["2025-
|
713
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
718
714
|
accept = _headers.pop("Accept", "application/xml")
|
719
715
|
|
720
716
|
# Construct URL
|
@@ -773,7 +769,7 @@ def build_copy_incremental_request(
|
|
773
769
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
774
770
|
|
775
771
|
comp: Literal["incrementalcopy"] = kwargs.pop("comp", _params.pop("comp", "incrementalcopy"))
|
776
|
-
version: Literal["2025-
|
772
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
777
773
|
accept = _headers.pop("Accept", "application/xml")
|
778
774
|
|
779
775
|
# Construct URL
|
@@ -821,7 +817,7 @@ class PageBlobOperations:
|
|
821
817
|
|
822
818
|
models = _models
|
823
819
|
|
824
|
-
def __init__(self, *args, **kwargs):
|
820
|
+
def __init__(self, *args, **kwargs) -> None:
|
825
821
|
input_args = list(args)
|
826
822
|
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
827
823
|
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
@@ -858,7 +854,7 @@ class PageBlobOperations:
|
|
858
854
|
:type blob_content_length: int
|
859
855
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
860
856
|
:code:`<a
|
861
|
-
href="https://
|
857
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
862
858
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
863
859
|
:type timeout: int
|
864
860
|
:param tier: Optional. Indicates the tier to be set on the page blob. Known values are: "P4",
|
@@ -1062,7 +1058,7 @@ class PageBlobOperations:
|
|
1062
1058
|
:type transactional_content_crc64: bytes
|
1063
1059
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1064
1060
|
:code:`<a
|
1065
|
-
href="https://
|
1061
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1066
1062
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1067
1063
|
:type timeout: int
|
1068
1064
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1241,7 +1237,7 @@ class PageBlobOperations:
|
|
1241
1237
|
:type content_length: int
|
1242
1238
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1243
1239
|
:code:`<a
|
1244
|
-
href="https://
|
1240
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1245
1241
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1246
1242
|
:type timeout: int
|
1247
1243
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1415,7 +1411,7 @@ class PageBlobOperations:
|
|
1415
1411
|
:type source_contentcrc64: bytes
|
1416
1412
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1417
1413
|
:code:`<a
|
1418
|
-
href="https://
|
1414
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1419
1415
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1420
1416
|
:type timeout: int
|
1421
1417
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -1597,12 +1593,12 @@ class PageBlobOperations:
|
|
1597
1593
|
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
1598
1594
|
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
1599
1595
|
see :code:`<a
|
1600
|
-
href="https://
|
1596
|
+
href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
|
1601
1597
|
a Snapshot of a Blob.</a>`. Default value is None.
|
1602
1598
|
:type snapshot: str
|
1603
1599
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1604
1600
|
:code:`<a
|
1605
|
-
href="https://
|
1601
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1606
1602
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1607
1603
|
:type timeout: int
|
1608
1604
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1736,12 +1732,12 @@ class PageBlobOperations:
|
|
1736
1732
|
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
1737
1733
|
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
1738
1734
|
see :code:`<a
|
1739
|
-
href="https://
|
1735
|
+
href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
|
1740
1736
|
a Snapshot of a Blob.</a>`. Default value is None.
|
1741
1737
|
:type snapshot: str
|
1742
1738
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1743
1739
|
:code:`<a
|
1744
|
-
href="https://
|
1740
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1745
1741
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1746
1742
|
:type timeout: int
|
1747
1743
|
:param prevsnapshot: Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a
|
@@ -1887,7 +1883,7 @@ class PageBlobOperations:
|
|
1887
1883
|
:type blob_content_length: int
|
1888
1884
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1889
1885
|
:code:`<a
|
1890
|
-
href="https://
|
1886
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1891
1887
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1892
1888
|
:type timeout: int
|
1893
1889
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -2015,7 +2011,7 @@ class PageBlobOperations:
|
|
2015
2011
|
:type sequence_number_action: str or ~azure.storage.blob.models.SequenceNumberActionType
|
2016
2012
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
2017
2013
|
:code:`<a
|
2018
|
-
href="https://
|
2014
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
2019
2015
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
2020
2016
|
:type timeout: int
|
2021
2017
|
:param blob_sequence_number: Set for page blobs only. The sequence number is a user-controlled
|
@@ -2132,7 +2128,7 @@ class PageBlobOperations:
|
|
2132
2128
|
:type copy_source: str
|
2133
2129
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
2134
2130
|
:code:`<a
|
2135
|
-
href="https://
|
2131
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
2136
2132
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
2137
2133
|
:type timeout: int
|
2138
2134
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
|
-
import
|
9
|
+
from collections.abc import MutableMapping
|
10
10
|
from typing import Any, Callable, Dict, IO, Iterator, List, Literal, Optional, TypeVar, Union
|
11
11
|
|
12
12
|
from azure.core import PipelineClient
|
@@ -27,12 +27,8 @@ from azure.core.utils import case_insensitive_dict
|
|
27
27
|
|
28
28
|
from .. import models as _models
|
29
29
|
from .._configuration import AzureBlobStorageConfiguration
|
30
|
-
from ..
|
30
|
+
from .._utils.serialization import Deserializer, Serializer
|
31
31
|
|
32
|
-
if sys.version_info >= (3, 9):
|
33
|
-
from collections.abc import MutableMapping
|
34
|
-
else:
|
35
|
-
from typing import MutableMapping # type: ignore
|
36
32
|
T = TypeVar("T")
|
37
33
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
38
34
|
|
@@ -49,7 +45,7 @@ def build_set_properties_request(
|
|
49
45
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
50
46
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
51
47
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
52
|
-
version: Literal["2025-
|
48
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
53
49
|
accept = _headers.pop("Accept", "application/xml")
|
54
50
|
|
55
51
|
# Construct URL
|
@@ -85,7 +81,7 @@ def build_get_properties_request(
|
|
85
81
|
|
86
82
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
87
83
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
88
|
-
version: Literal["2025-
|
84
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
89
85
|
accept = _headers.pop("Accept", "application/xml")
|
90
86
|
|
91
87
|
# Construct URL
|
@@ -119,7 +115,7 @@ def build_get_statistics_request(
|
|
119
115
|
|
120
116
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
121
117
|
comp: Literal["stats"] = kwargs.pop("comp", _params.pop("comp", "stats"))
|
122
|
-
version: Literal["2025-
|
118
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
123
119
|
accept = _headers.pop("Accept", "application/xml")
|
124
120
|
|
125
121
|
# Construct URL
|
@@ -160,7 +156,7 @@ def build_list_containers_segment_request(
|
|
160
156
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
161
157
|
|
162
158
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
163
|
-
version: Literal["2025-
|
159
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
164
160
|
accept = _headers.pop("Accept", "application/xml")
|
165
161
|
|
166
162
|
# Construct URL
|
@@ -202,7 +198,7 @@ def build_get_user_delegation_key_request(
|
|
202
198
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
203
199
|
comp: Literal["userdelegationkey"] = kwargs.pop("comp", _params.pop("comp", "userdelegationkey"))
|
204
200
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
205
|
-
version: Literal["2025-
|
201
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
206
202
|
accept = _headers.pop("Accept", "application/xml")
|
207
203
|
|
208
204
|
# Construct URL
|
@@ -238,7 +234,7 @@ def build_get_account_info_request(
|
|
238
234
|
|
239
235
|
restype: Literal["account"] = kwargs.pop("restype", _params.pop("restype", "account"))
|
240
236
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
241
|
-
version: Literal["2025-
|
237
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
242
238
|
accept = _headers.pop("Accept", "application/xml")
|
243
239
|
|
244
240
|
# Construct URL
|
@@ -278,7 +274,7 @@ def build_submit_batch_request(
|
|
278
274
|
|
279
275
|
comp: Literal["batch"] = kwargs.pop("comp", _params.pop("comp", "batch"))
|
280
276
|
multipart_content_type: Optional[str] = kwargs.pop("multipart_content_type", _headers.pop("Content-Type", None))
|
281
|
-
version: Literal["2025-
|
277
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
282
278
|
accept = _headers.pop("Accept", "application/xml")
|
283
279
|
|
284
280
|
# Construct URL
|
@@ -321,7 +317,7 @@ def build_filter_blobs_request(
|
|
321
317
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
322
318
|
|
323
319
|
comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
|
324
|
-
version: Literal["2025-
|
320
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
325
321
|
accept = _headers.pop("Accept", "application/xml")
|
326
322
|
|
327
323
|
# Construct URL
|
@@ -366,7 +362,7 @@ class ServiceOperations:
|
|
366
362
|
|
367
363
|
models = _models
|
368
364
|
|
369
|
-
def __init__(self, *args, **kwargs):
|
365
|
+
def __init__(self, *args, **kwargs) -> None:
|
370
366
|
input_args = list(args)
|
371
367
|
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
372
368
|
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
@@ -388,7 +384,7 @@ class ServiceOperations:
|
|
388
384
|
:type storage_service_properties: ~azure.storage.blob.models.StorageServiceProperties
|
389
385
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
390
386
|
:code:`<a
|
391
|
-
href="https://
|
387
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
392
388
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
393
389
|
:type timeout: int
|
394
390
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -462,7 +458,7 @@ class ServiceOperations:
|
|
462
458
|
|
463
459
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
464
460
|
:code:`<a
|
465
|
-
href="https://
|
461
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
466
462
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
467
463
|
:type timeout: int
|
468
464
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -536,7 +532,7 @@ class ServiceOperations:
|
|
536
532
|
|
537
533
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
538
534
|
:code:`<a
|
539
|
-
href="https://
|
535
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
540
536
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
541
537
|
:type timeout: int
|
542
538
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -637,7 +633,7 @@ class ServiceOperations:
|
|
637
633
|
:type include: list[str or ~azure.storage.blob.models.ListContainersIncludeType]
|
638
634
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
639
635
|
:code:`<a
|
640
|
-
href="https://
|
636
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
641
637
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
642
638
|
:type timeout: int
|
643
639
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -718,7 +714,7 @@ class ServiceOperations:
|
|
718
714
|
:type key_info: ~azure.storage.blob.models.KeyInfo
|
719
715
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
720
716
|
:code:`<a
|
721
|
-
href="https://
|
717
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
722
718
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
723
719
|
:type timeout: int
|
724
720
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -796,7 +792,7 @@ class ServiceOperations:
|
|
796
792
|
|
797
793
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
798
794
|
:code:`<a
|
799
|
-
href="https://
|
795
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
800
796
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
801
797
|
:type timeout: int
|
802
798
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -877,7 +873,7 @@ class ServiceOperations:
|
|
877
873
|
:type body: IO[bytes]
|
878
874
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
879
875
|
:code:`<a
|
880
|
-
href="https://
|
876
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
881
877
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
882
878
|
:type timeout: int
|
883
879
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -967,7 +963,7 @@ class ServiceOperations:
|
|
967
963
|
|
968
964
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
969
965
|
:code:`<a
|
970
|
-
href="https://
|
966
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
971
967
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
972
968
|
:type timeout: int
|
973
969
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
azure/storage/blob/_lease.py
CHANGED
@@ -102,6 +102,7 @@ class BlobLeaseClient(): # pylint: disable=client-accepts-api-version-keyword
|
|
102
102
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
103
103
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
104
104
|
#other-client--per-operation-configuration>`__.
|
105
|
+
:return: None
|
105
106
|
:rtype: None
|
106
107
|
"""
|
107
108
|
mod_conditions = get_modify_conditions(kwargs)
|
@@ -18,7 +18,7 @@ from ._deserialize import (
|
|
18
18
|
parse_tags
|
19
19
|
)
|
20
20
|
from ._generated.models import BlobItemInternal, BlobPrefix as GenBlobPrefix, FilterBlobItem
|
21
|
-
from ._generated.
|
21
|
+
from ._generated._utils.serialization import Deserializer
|
22
22
|
from ._models import BlobProperties, FilteredBlob
|
23
23
|
from ._shared.models import DictMixin
|
24
24
|
from ._shared.response_handlers import (
|
@@ -84,7 +84,7 @@ class BlobQueryReader: # pylint: disable=too-many-instance-attributes
|
|
84
84
|
|
85
85
|
This operation is blocking until all data is downloaded.
|
86
86
|
|
87
|
-
:
|
87
|
+
:return: The query results.
|
88
88
|
:rtype: bytes
|
89
89
|
"""
|
90
90
|
stream = BytesIO()
|
@@ -100,7 +100,7 @@ class BlobQueryReader: # pylint: disable=too-many-instance-attributes
|
|
100
100
|
:param IO stream:
|
101
101
|
The stream to download to. This can be an open file-handle,
|
102
102
|
or any writable stream.
|
103
|
-
:
|
103
|
+
:return: None
|
104
104
|
"""
|
105
105
|
for record in self._iter_stream():
|
106
106
|
stream.write(record)
|
@@ -110,7 +110,7 @@ class BlobQueryReader: # pylint: disable=too-many-instance-attributes
|
|
110
110
|
|
111
111
|
Records will be returned line by line.
|
112
112
|
|
113
|
-
:
|
113
|
+
:return: A record generator for the query result.
|
114
114
|
:rtype: Iterable[bytes]
|
115
115
|
"""
|
116
116
|
delimiter = self.record_delimiter.encode('utf-8')
|
azure/storage/blob/_serialize.py
CHANGED
@@ -11,7 +11,7 @@ import hmac
|
|
11
11
|
try:
|
12
12
|
from urllib.parse import quote, unquote
|
13
13
|
except ImportError:
|
14
|
-
from urllib2 import quote, unquote
|
14
|
+
from urllib2 import quote, unquote # type: ignore
|
15
15
|
|
16
16
|
|
17
17
|
def url_quote(url):
|
@@ -24,20 +24,20 @@ def url_unquote(url):
|
|
24
24
|
|
25
25
|
def encode_base64(data):
|
26
26
|
if isinstance(data, str):
|
27
|
-
data = data.encode(
|
27
|
+
data = data.encode("utf-8")
|
28
28
|
encoded = base64.b64encode(data)
|
29
|
-
return encoded.decode(
|
29
|
+
return encoded.decode("utf-8")
|
30
30
|
|
31
31
|
|
32
32
|
def decode_base64_to_bytes(data):
|
33
33
|
if isinstance(data, str):
|
34
|
-
data = data.encode(
|
34
|
+
data = data.encode("utf-8")
|
35
35
|
return base64.b64decode(data)
|
36
36
|
|
37
37
|
|
38
38
|
def decode_base64_to_text(data):
|
39
39
|
decoded_bytes = decode_base64_to_bytes(data)
|
40
|
-
return decoded_bytes.decode(
|
40
|
+
return decoded_bytes.decode("utf-8")
|
41
41
|
|
42
42
|
|
43
43
|
def sign_string(key, string_to_sign, key_is_base64=True):
|
@@ -45,9 +45,9 @@ def sign_string(key, string_to_sign, key_is_base64=True):
|
|
45
45
|
key = decode_base64_to_bytes(key)
|
46
46
|
else:
|
47
47
|
if isinstance(key, str):
|
48
|
-
key = key.encode(
|
48
|
+
key = key.encode("utf-8")
|
49
49
|
if isinstance(string_to_sign, str):
|
50
|
-
string_to_sign = string_to_sign.encode(
|
50
|
+
string_to_sign = string_to_sign.encode("utf-8")
|
51
51
|
signed_hmac_sha256 = hmac.HMAC(key, string_to_sign, hashlib.sha256)
|
52
52
|
digest = signed_hmac_sha256.digest()
|
53
53
|
encoded_digest = encode_base64(digest)
|