azure-storage-blob 12.26.0b1__py3-none-any.whl → 12.27.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.
- azure/storage/blob/__init__.py +6 -5
- azure/storage/blob/_blob_client.py +59 -38
- azure/storage/blob/_blob_client.pyi +780 -0
- azure/storage/blob/_blob_client_helpers.py +4 -3
- azure/storage/blob/_blob_service_client.py +57 -17
- azure/storage/blob/_blob_service_client.pyi +182 -0
- azure/storage/blob/_container_client.py +47 -22
- azure/storage/blob/_container_client.pyi +380 -0
- 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 +3 -2
- azure/storage/blob/_lease.pyi +81 -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 +79 -70
- azure/storage/blob/_shared/base_client_async.py +53 -68
- 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 +58 -69
- 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 +8 -10
- azure/storage/blob/aio/_blob_client_async.py +81 -48
- azure/storage/blob/aio/_blob_client_async.pyi +763 -0
- azure/storage/blob/aio/_blob_service_client_async.py +54 -15
- azure/storage/blob/aio/_blob_service_client_async.pyi +187 -0
- azure/storage/blob/aio/_container_client_async.py +55 -26
- azure/storage/blob/aio/_container_client_async.pyi +384 -0
- azure/storage/blob/aio/_download_async.py +15 -11
- azure/storage/blob/aio/_lease_async.py +3 -2
- azure/storage/blob/aio/_lease_async.pyi +81 -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.0.dist-info}/METADATA +18 -6
- azure_storage_blob-12.27.0.dist-info/RECORD +94 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/WHEEL +1 -1
- azure_storage_blob-12.26.0b1.dist-info/RECORD +0 -85
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info/licenses}/LICENSE +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,380 @@
|
|
1
|
+
# -------------------------------------------------------------------------
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
4
|
+
# license information.
|
5
|
+
# --------------------------------------------------------------------------
|
6
|
+
# pylint: skip-file
|
7
|
+
|
8
|
+
from datetime import datetime
|
9
|
+
from types import TracebackType
|
10
|
+
from typing import (
|
11
|
+
Any,
|
12
|
+
AnyStr,
|
13
|
+
Callable,
|
14
|
+
Dict,
|
15
|
+
List,
|
16
|
+
IO,
|
17
|
+
Iterable,
|
18
|
+
Iterator,
|
19
|
+
Optional,
|
20
|
+
overload,
|
21
|
+
Union,
|
22
|
+
)
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
from azure.core import MatchConditions
|
26
|
+
from azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential, TokenCredential
|
27
|
+
from azure.core.paging import ItemPaged
|
28
|
+
from azure.core.pipeline.transport import HttpResponse
|
29
|
+
from azure.core.tracing.decorator import distributed_trace
|
30
|
+
from ._blob_client import BlobClient
|
31
|
+
from ._blob_service_client import BlobServiceClient
|
32
|
+
from ._download import StorageStreamDownloader
|
33
|
+
from ._encryption import StorageEncryptionMixin
|
34
|
+
from ._generated.models import RehydratePriority
|
35
|
+
from ._lease import BlobLeaseClient
|
36
|
+
from ._list_blobs_helper import BlobPrefix
|
37
|
+
from ._models import (
|
38
|
+
AccessPolicy,
|
39
|
+
BlobProperties,
|
40
|
+
BlobType,
|
41
|
+
ContainerEncryptionScope,
|
42
|
+
ContainerProperties,
|
43
|
+
ContentSettings,
|
44
|
+
CustomerProvidedEncryptionKey,
|
45
|
+
FilteredBlob,
|
46
|
+
PremiumPageBlobTier,
|
47
|
+
PublicAccess,
|
48
|
+
StandardBlobTier,
|
49
|
+
)
|
50
|
+
from ._shared.base_client import StorageAccountHostsMixin
|
51
|
+
|
52
|
+
class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
53
|
+
account_name: str
|
54
|
+
container_name: str
|
55
|
+
def __init__(
|
56
|
+
self,
|
57
|
+
account_url: str,
|
58
|
+
container_name: str,
|
59
|
+
credential: Optional[
|
60
|
+
Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]
|
61
|
+
] = None,
|
62
|
+
*,
|
63
|
+
api_version: Optional[str] = None,
|
64
|
+
secondary_hostname: Optional[str] = None,
|
65
|
+
audience: Optional[str] = None,
|
66
|
+
max_block_size: int = 4 * 1024 * 1024,
|
67
|
+
max_page_size: int = 4 * 1024 * 1024,
|
68
|
+
max_chunk_get_size: int = 4 * 1024 * 1024,
|
69
|
+
max_single_put_size: int = 64 * 1024 * 1024,
|
70
|
+
max_single_get_size: int = 32 * 1024 * 1024,
|
71
|
+
min_large_block_upload_threshold: int = 4 * 1024 * 1024 + 1,
|
72
|
+
use_byte_buffer: Optional[bool] = None,
|
73
|
+
**kwargs: Any,
|
74
|
+
) -> None: ...
|
75
|
+
def __enter__(self) -> Self: ...
|
76
|
+
def __exit__(
|
77
|
+
self, typ: Optional[type[BaseException]], exc: Optional[BaseException], tb: Optional[TracebackType]
|
78
|
+
) -> None: ...
|
79
|
+
def close(self) -> None: ...
|
80
|
+
@classmethod
|
81
|
+
def from_container_url(
|
82
|
+
cls,
|
83
|
+
container_url: str,
|
84
|
+
credential: Optional[
|
85
|
+
Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]
|
86
|
+
] = None,
|
87
|
+
*,
|
88
|
+
api_version: Optional[str] = None,
|
89
|
+
secondary_hostname: Optional[str] = None,
|
90
|
+
audience: Optional[str] = None,
|
91
|
+
max_block_size: int = 4 * 1024 * 1024,
|
92
|
+
max_page_size: int = 4 * 1024 * 1024,
|
93
|
+
max_chunk_get_size: int = 4 * 1024 * 1024,
|
94
|
+
max_single_put_size: int = 64 * 1024 * 1024,
|
95
|
+
max_single_get_size: int = 32 * 1024 * 1024,
|
96
|
+
min_large_block_upload_threshold: int = 4 * 1024 * 1024 + 1,
|
97
|
+
use_byte_buffer: Optional[bool] = None,
|
98
|
+
**kwargs: Any,
|
99
|
+
) -> Self: ...
|
100
|
+
@classmethod
|
101
|
+
def from_connection_string(
|
102
|
+
cls,
|
103
|
+
conn_str: str,
|
104
|
+
container_name: str,
|
105
|
+
credential: Optional[
|
106
|
+
Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]
|
107
|
+
] = None,
|
108
|
+
*,
|
109
|
+
api_version: Optional[str] = None,
|
110
|
+
secondary_hostname: Optional[str] = None,
|
111
|
+
audience: Optional[str] = None,
|
112
|
+
max_block_size: int = 4 * 1024 * 1024,
|
113
|
+
max_page_size: int = 4 * 1024 * 1024,
|
114
|
+
max_chunk_get_size: int = 4 * 1024 * 1024,
|
115
|
+
max_single_put_size: int = 64 * 1024 * 1024,
|
116
|
+
max_single_get_size: int = 32 * 1024 * 1024,
|
117
|
+
min_large_block_upload_threshold: int = 4 * 1024 * 1024 + 1,
|
118
|
+
use_byte_buffer: Optional[bool] = None,
|
119
|
+
**kwargs: Any,
|
120
|
+
) -> Self: ...
|
121
|
+
@distributed_trace
|
122
|
+
def create_container(
|
123
|
+
self,
|
124
|
+
metadata: Optional[Dict[str, str]] = None,
|
125
|
+
public_access: Optional[Union[PublicAccess, str]] = None,
|
126
|
+
*,
|
127
|
+
container_encryption_scope: Optional[Union[Dict[str, Any], ContainerEncryptionScope]] = None,
|
128
|
+
timeout: Optional[int] = None,
|
129
|
+
**kwargs: Any,
|
130
|
+
) -> Dict[str, Union[str, datetime]]: ...
|
131
|
+
@distributed_trace
|
132
|
+
def _rename_container(
|
133
|
+
self,
|
134
|
+
new_name: str,
|
135
|
+
*,
|
136
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
137
|
+
timeout: Optional[int] = None,
|
138
|
+
**kwargs: Any,
|
139
|
+
) -> "ContainerClient": ...
|
140
|
+
@distributed_trace
|
141
|
+
def delete_container(
|
142
|
+
self,
|
143
|
+
*,
|
144
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
145
|
+
if_modified_since: Optional[datetime] = None,
|
146
|
+
if_unmodified_since: Optional[datetime] = None,
|
147
|
+
etag: Optional[str] = None,
|
148
|
+
match_condition: Optional[MatchConditions] = None,
|
149
|
+
timeout: Optional[int] = None,
|
150
|
+
**kwargs: Any,
|
151
|
+
) -> None: ...
|
152
|
+
@distributed_trace
|
153
|
+
def acquire_lease(
|
154
|
+
self,
|
155
|
+
lease_duration: int = -1,
|
156
|
+
lease_id: Optional[str] = None,
|
157
|
+
*,
|
158
|
+
if_modified_since: Optional[datetime] = None,
|
159
|
+
if_unmodified_since: Optional[datetime] = None,
|
160
|
+
etag: Optional[str] = None,
|
161
|
+
match_condition: Optional[MatchConditions] = None,
|
162
|
+
timeout: Optional[int] = None,
|
163
|
+
**kwargs: Any,
|
164
|
+
) -> BlobLeaseClient: ...
|
165
|
+
@distributed_trace
|
166
|
+
def get_account_information(self, **kwargs: Any) -> Dict[str, str]: ...
|
167
|
+
@distributed_trace
|
168
|
+
def get_container_properties(
|
169
|
+
self, *, lease: Optional[Union[BlobLeaseClient, str]] = None, timeout: Optional[int] = None, **kwargs: Any
|
170
|
+
) -> ContainerProperties: ...
|
171
|
+
@distributed_trace
|
172
|
+
def exists(self, *, timeout: Optional[int] = None, **kwargs: Any) -> bool: ...
|
173
|
+
@distributed_trace
|
174
|
+
def set_container_metadata(
|
175
|
+
self,
|
176
|
+
metadata: Optional[Dict[str, str]] = None,
|
177
|
+
*,
|
178
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
179
|
+
if_modified_since: Optional[datetime] = None,
|
180
|
+
if_unmodified_since: Optional[datetime] = None,
|
181
|
+
etag: Optional[str] = None,
|
182
|
+
match_condition: Optional[MatchConditions] = None,
|
183
|
+
timeout: Optional[int] = None,
|
184
|
+
**kwargs: Any,
|
185
|
+
) -> Dict[str, Union[str, datetime]]: ...
|
186
|
+
@distributed_trace
|
187
|
+
def _get_blob_service_client(self) -> BlobServiceClient: ...
|
188
|
+
@distributed_trace
|
189
|
+
def get_container_access_policy(
|
190
|
+
self, *, lease: Optional[Union[BlobLeaseClient, str]] = None, timeout: Optional[int] = None, **kwargs: Any
|
191
|
+
) -> Dict[str, Any]: ...
|
192
|
+
@distributed_trace
|
193
|
+
def set_container_access_policy(
|
194
|
+
self,
|
195
|
+
signed_identifiers: Dict[str, AccessPolicy],
|
196
|
+
public_access: Optional[Union[str, PublicAccess]] = None,
|
197
|
+
*,
|
198
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
199
|
+
if_modified_since: Optional[datetime] = None,
|
200
|
+
if_unmodified_since: Optional[datetime] = None,
|
201
|
+
timeout: Optional[int] = None,
|
202
|
+
**kwargs: Any,
|
203
|
+
) -> Dict[str, Union[str, datetime]]: ...
|
204
|
+
@distributed_trace
|
205
|
+
def list_blobs(
|
206
|
+
self,
|
207
|
+
name_starts_with: Optional[str] = None,
|
208
|
+
include: Optional[Union[str, List[str]]] = None,
|
209
|
+
*,
|
210
|
+
timeout: Optional[int] = None,
|
211
|
+
**kwargs: Any,
|
212
|
+
) -> ItemPaged[BlobProperties]: ...
|
213
|
+
@distributed_trace
|
214
|
+
def list_blob_names(
|
215
|
+
self, *, name_starts_with: Optional[str] = None, timeout: Optional[int] = None, **kwargs: Any
|
216
|
+
) -> ItemPaged[str]: ...
|
217
|
+
@distributed_trace
|
218
|
+
def walk_blobs(
|
219
|
+
self,
|
220
|
+
name_starts_with: Optional[str] = None,
|
221
|
+
include: Optional[Union[List[str], str]] = None,
|
222
|
+
delimiter: str = "/",
|
223
|
+
*,
|
224
|
+
timeout: Optional[int] = None,
|
225
|
+
**kwargs: Any,
|
226
|
+
) -> ItemPaged[Union[BlobProperties, BlobPrefix]]: ...
|
227
|
+
@distributed_trace
|
228
|
+
def find_blobs_by_tags(
|
229
|
+
self,
|
230
|
+
filter_expression: str,
|
231
|
+
*,
|
232
|
+
results_per_page: Optional[int] = None,
|
233
|
+
timeout: Optional[int] = None,
|
234
|
+
**kwargs: Any,
|
235
|
+
) -> ItemPaged[FilteredBlob]: ...
|
236
|
+
@distributed_trace
|
237
|
+
def upload_blob(
|
238
|
+
self,
|
239
|
+
name: str,
|
240
|
+
data: Union[bytes, str, Iterable[AnyStr], IO[AnyStr]],
|
241
|
+
blob_type: Union[str, BlobType] = BlobType.BLOCKBLOB,
|
242
|
+
length: Optional[int] = None,
|
243
|
+
metadata: Optional[Dict[str, str]] = None,
|
244
|
+
*,
|
245
|
+
overwrite: Optional[bool] = None,
|
246
|
+
content_settings: Optional[ContentSettings] = None,
|
247
|
+
validate_content: Optional[bool] = None,
|
248
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
249
|
+
if_modified_since: Optional[datetime] = None,
|
250
|
+
if_unmodified_since: Optional[datetime] = None,
|
251
|
+
etag: Optional[str] = None,
|
252
|
+
match_condition: Optional[MatchConditions] = None,
|
253
|
+
if_tags_match_condition: Optional[str] = None,
|
254
|
+
timeout: Optional[int] = None,
|
255
|
+
premium_page_blob_tier: Optional[PremiumPageBlobTier] = None,
|
256
|
+
standard_blob_tier: Optional[StandardBlobTier] = None,
|
257
|
+
maxsize_condition: Optional[int] = None,
|
258
|
+
max_concurrency: Optional[int] = None,
|
259
|
+
cpk: Optional[CustomerProvidedEncryptionKey] = None,
|
260
|
+
encryption_scope: Optional[str] = None,
|
261
|
+
encoding: Optional[str] = None,
|
262
|
+
progress_hook: Optional[Callable[[int, Optional[int]], None]] = None,
|
263
|
+
**kwargs: Any,
|
264
|
+
) -> BlobClient: ...
|
265
|
+
@distributed_trace
|
266
|
+
def delete_blob(
|
267
|
+
self,
|
268
|
+
blob: str,
|
269
|
+
delete_snapshots: Optional[str] = None,
|
270
|
+
*,
|
271
|
+
version_id: Optional[str] = None,
|
272
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
273
|
+
if_modified_since: Optional[datetime] = None,
|
274
|
+
if_unmodified_since: Optional[datetime] = None,
|
275
|
+
etag: Optional[str] = None,
|
276
|
+
match_condition: Optional[MatchConditions] = None,
|
277
|
+
if_tags_match_condition: Optional[str] = None,
|
278
|
+
timeout: Optional[int] = None,
|
279
|
+
**kwargs: Any,
|
280
|
+
) -> None: ...
|
281
|
+
@overload
|
282
|
+
def download_blob(
|
283
|
+
self,
|
284
|
+
blob: str,
|
285
|
+
offset: Optional[int] = None,
|
286
|
+
length: Optional[int] = None,
|
287
|
+
*,
|
288
|
+
version_id: Optional[str] = None,
|
289
|
+
validate_content: Optional[bool] = None,
|
290
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
291
|
+
if_modified_since: Optional[datetime] = None,
|
292
|
+
if_unmodified_since: Optional[datetime] = None,
|
293
|
+
etag: Optional[str] = None,
|
294
|
+
match_condition: Optional[MatchConditions] = None,
|
295
|
+
if_tags_match_condition: Optional[str] = None,
|
296
|
+
cpk: Optional[CustomerProvidedEncryptionKey] = None,
|
297
|
+
max_concurrency: Optional[int] = None,
|
298
|
+
encoding: str,
|
299
|
+
progress_hook: Optional[Callable[[int, int], None]] = None,
|
300
|
+
timeout: Optional[int] = None,
|
301
|
+
) -> StorageStreamDownloader[str]: ...
|
302
|
+
@overload
|
303
|
+
def download_blob(
|
304
|
+
self,
|
305
|
+
blob: str,
|
306
|
+
offset: Optional[int] = None,
|
307
|
+
length: Optional[int] = None,
|
308
|
+
*,
|
309
|
+
version_id: Optional[str] = None,
|
310
|
+
validate_content: Optional[bool] = None,
|
311
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
312
|
+
if_modified_since: Optional[datetime] = None,
|
313
|
+
if_unmodified_since: Optional[datetime] = None,
|
314
|
+
etag: Optional[str] = None,
|
315
|
+
match_condition: Optional[MatchConditions] = None,
|
316
|
+
if_tags_match_condition: Optional[str] = None,
|
317
|
+
cpk: Optional[CustomerProvidedEncryptionKey] = None,
|
318
|
+
max_concurrency: Optional[int] = None,
|
319
|
+
encoding: None = None,
|
320
|
+
progress_hook: Optional[Callable[[int, int], None]] = None,
|
321
|
+
timeout: Optional[int] = None,
|
322
|
+
**kwargs: Any,
|
323
|
+
) -> StorageStreamDownloader[bytes]: ...
|
324
|
+
@distributed_trace # type: ignore[misc]
|
325
|
+
def download_blob(
|
326
|
+
self,
|
327
|
+
blob: str,
|
328
|
+
offset: Optional[int] = None,
|
329
|
+
length: Optional[int] = None,
|
330
|
+
*,
|
331
|
+
version_id: Optional[str] = None,
|
332
|
+
validate_content: Optional[bool] = None,
|
333
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
334
|
+
if_modified_since: Optional[datetime] = None,
|
335
|
+
if_unmodified_since: Optional[datetime] = None,
|
336
|
+
etag: Optional[str] = None,
|
337
|
+
match_condition: Optional[MatchConditions] = None,
|
338
|
+
if_tags_match_condition: Optional[str] = None,
|
339
|
+
cpk: Optional[CustomerProvidedEncryptionKey] = None,
|
340
|
+
max_concurrency: Optional[int] = None,
|
341
|
+
encoding: Optional[str] = None,
|
342
|
+
progress_hook: Optional[Callable[[int, int], None]] = None,
|
343
|
+
timeout: Optional[int] = None,
|
344
|
+
**kwargs: Any,
|
345
|
+
) -> Union[StorageStreamDownloader[str], StorageStreamDownloader[bytes]]: ...
|
346
|
+
@distributed_trace
|
347
|
+
def delete_blobs(
|
348
|
+
self,
|
349
|
+
*blobs: Union[str, Dict[str, Any], BlobProperties],
|
350
|
+
delete_snapshots: Optional[str] = None,
|
351
|
+
if_modified_since: Optional[datetime] = None,
|
352
|
+
if_unmodified_since: Optional[datetime] = None,
|
353
|
+
if_tags_match_condition: Optional[str] = None,
|
354
|
+
raise_on_any_failure: bool = True,
|
355
|
+
timeout: Optional[int] = None,
|
356
|
+
**kwargs: Any,
|
357
|
+
) -> Iterator[HttpResponse]: ...
|
358
|
+
@distributed_trace
|
359
|
+
def set_standard_blob_tier_blobs(
|
360
|
+
self,
|
361
|
+
standard_blob_tier: Optional[Union[str, StandardBlobTier]],
|
362
|
+
*blobs: Union[str, Dict[str, Any], BlobProperties],
|
363
|
+
rehydrate_priority: Optional[RehydratePriority] = None,
|
364
|
+
if_tags_match_condition: Optional[str] = None,
|
365
|
+
raise_on_any_failure: bool = True,
|
366
|
+
timeout: Optional[int] = None,
|
367
|
+
**kwargs: Any,
|
368
|
+
) -> Iterator[HttpResponse]: ...
|
369
|
+
@distributed_trace
|
370
|
+
def set_premium_page_blob_tier_blobs(
|
371
|
+
self,
|
372
|
+
premium_page_blob_tier: Optional[Union[str, PremiumPageBlobTier]],
|
373
|
+
*blobs: Union[str, Dict[str, Any], BlobProperties],
|
374
|
+
raise_on_any_failure: bool = True,
|
375
|
+
timeout: Optional[int] = None,
|
376
|
+
**kwargs: Any,
|
377
|
+
) -> Iterator[HttpResponse]: ...
|
378
|
+
def get_blob_client(
|
379
|
+
self, blob: str, snapshot: Optional[str] = None, *, version_id: Optional[str] = None
|
380
|
+
) -> BlobClient: ...
|
@@ -194,7 +194,7 @@ def parse_tags(generated_tags: Optional["BlobTags"]) -> Optional[Dict[str, str]]
|
|
194
194
|
|
195
195
|
:param Optional[BlobTags] generated_tags:
|
196
196
|
A list containing the BlobTag objects from generated code.
|
197
|
-
:
|
197
|
+
:return: A dictionary of the BlobTag objects.
|
198
198
|
:rtype: Optional[Dict[str, str]]
|
199
199
|
"""
|
200
200
|
if generated_tags:
|
azure/storage/blob/_download.py
CHANGED
@@ -547,7 +547,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
547
547
|
|
548
548
|
NOTE: If the stream has been partially read, some data may be re-downloaded by the iterator.
|
549
549
|
|
550
|
-
:
|
550
|
+
:return: An iterator of the chunks in the download stream.
|
551
551
|
:rtype: Iterator[bytes]
|
552
552
|
|
553
553
|
.. admonition:: Example:
|
@@ -621,7 +621,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
621
621
|
The number of chars to download from the stream. Leave unspecified
|
622
622
|
or set negative to download all chars. Note, this can only be used
|
623
623
|
when encoding is specified on `download_blob`.
|
624
|
-
:
|
624
|
+
:return:
|
625
625
|
The requested data as bytes or a string if encoding was specified. If
|
626
626
|
the return value is empty, there is no more data to read.
|
627
627
|
:rtype: T
|
@@ -757,7 +757,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
757
757
|
Read the entire contents of this blob.
|
758
758
|
This operation is blocking until all data is downloaded.
|
759
759
|
|
760
|
-
:
|
760
|
+
:return: The requested data as bytes or a string if encoding was specified.
|
761
761
|
:rtype: T
|
762
762
|
"""
|
763
763
|
return self.read()
|
@@ -769,7 +769,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
769
769
|
The stream to download to. This can be an open file-handle,
|
770
770
|
or any writable stream. The stream must be seekable if the download
|
771
771
|
uses more than one parallel connection.
|
772
|
-
:
|
772
|
+
:return: The number of bytes read.
|
773
773
|
:rtype: int
|
774
774
|
"""
|
775
775
|
if self._text_mode:
|
@@ -866,7 +866,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
866
866
|
|
867
867
|
:param int max_concurrency:
|
868
868
|
The number of parallel connections with which to download.
|
869
|
-
:
|
869
|
+
:return: The contents of the file as bytes.
|
870
870
|
:rtype: bytes
|
871
871
|
"""
|
872
872
|
warnings.warn(
|
@@ -891,7 +891,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
891
891
|
The number of parallel connections with which to download.
|
892
892
|
:param str encoding:
|
893
893
|
Test encoding to decode the downloaded bytes. Default is UTF-8.
|
894
|
-
:
|
894
|
+
:return: The content of the file as a str.
|
895
895
|
:rtype: str
|
896
896
|
"""
|
897
897
|
warnings.warn(
|
@@ -917,7 +917,7 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
917
917
|
uses more than one parallel connection.
|
918
918
|
:param int max_concurrency:
|
919
919
|
The number of parallel connections with which to download.
|
920
|
-
:
|
920
|
+
:return: The properties of the downloaded blob.
|
921
921
|
:rtype: Any
|
922
922
|
"""
|
923
923
|
warnings.warn(
|