azure-storage-blob 12.26.0__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 +3 -3
- azure/storage/blob/_blob_client.py +16 -0
- azure/storage/blob/_blob_client.pyi +780 -0
- azure/storage/blob/_blob_service_client.py +41 -4
- azure/storage/blob/_blob_service_client.pyi +182 -0
- azure/storage/blob/_container_client.py +22 -0
- azure/storage/blob/_container_client.pyi +380 -0
- 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 +2 -2
- azure/storage/blob/_lease.pyi +81 -0
- azure/storage/blob/_list_blobs_helper.py +1 -1
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/base_client.py +0 -13
- azure/storage/blob/_shared/base_client_async.py +0 -22
- azure/storage/blob/_shared/models.py +1 -0
- azure/storage/blob/_shared/policies.py +10 -2
- azure/storage/blob/_shared/response_handlers.py +5 -0
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +5 -8
- azure/storage/blob/aio/_blob_client_async.py +28 -8
- azure/storage/blob/aio/_blob_client_async.pyi +763 -0
- azure/storage/blob/aio/_blob_service_client_async.py +41 -4
- azure/storage/blob/aio/_blob_service_client_async.pyi +187 -0
- azure/storage/blob/aio/_container_client_async.py +27 -1
- azure/storage/blob/aio/_container_client_async.pyi +384 -0
- azure/storage/blob/aio/_lease_async.py +2 -2
- azure/storage/blob/aio/_lease_async.pyi +81 -0
- {azure_storage_blob-12.26.0.dist-info → azure_storage_blob-12.27.0.dist-info}/METADATA +17 -5
- {azure_storage_blob-12.26.0.dist-info → azure_storage_blob-12.27.0.dist-info}/RECORD +50 -41
- {azure_storage_blob-12.26.0.dist-info → azure_storage_blob-12.27.0.dist-info}/WHEEL +1 -1
- {azure_storage_blob-12.26.0.dist-info → azure_storage_blob-12.27.0.dist-info/licenses}/LICENSE +0 -0
- {azure_storage_blob-12.26.0.dist-info → azure_storage_blob-12.27.0.dist-info}/top_level.txt +0 -0
@@ -131,7 +131,23 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
131
131
|
self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
|
132
132
|
self._configure_encryption(kwargs)
|
133
133
|
|
134
|
-
def
|
134
|
+
def __enter__(self) -> Self:
|
135
|
+
self._client.__enter__()
|
136
|
+
return self
|
137
|
+
|
138
|
+
def __exit__(self, *args) -> None:
|
139
|
+
self._client.__exit__(*args)
|
140
|
+
|
141
|
+
def close(self) -> None:
|
142
|
+
"""This method is to close the sockets opened by the client.
|
143
|
+
It need not be used when using with a context manager.
|
144
|
+
|
145
|
+
:return: None
|
146
|
+
:rtype: None
|
147
|
+
"""
|
148
|
+
self._client.close()
|
149
|
+
|
150
|
+
def _format_url(self, hostname: str) -> str:
|
135
151
|
"""Format the endpoint URL according to the current location
|
136
152
|
mode hostname.
|
137
153
|
|
@@ -166,6 +182,27 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
166
182
|
~azure.core.credentials.AzureSasCredential or
|
167
183
|
~azure.core.credentials.TokenCredential or
|
168
184
|
str or dict[str, str] or None
|
185
|
+
:keyword str api_version:
|
186
|
+
The Storage API version to use for requests. Default value is the most recent service version that is
|
187
|
+
compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.
|
188
|
+
|
189
|
+
.. versionadded:: 12.2.0
|
190
|
+
|
191
|
+
:keyword str secondary_hostname:
|
192
|
+
The hostname of the secondary endpoint.
|
193
|
+
:keyword int max_block_size: The maximum chunk size for uploading a block blob in chunks.
|
194
|
+
Defaults to 4*1024*1024, or 4MB.
|
195
|
+
:keyword int max_single_put_size: If the blob size is less than or equal max_single_put_size, then the blob will
|
196
|
+
be uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
|
197
|
+
the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.
|
198
|
+
:keyword int min_large_block_upload_threshold: The minimum chunk size required to use the memory efficient
|
199
|
+
algorithm when uploading a block blob. Defaults to 4*1024*1024+1.
|
200
|
+
:keyword bool use_byte_buffer: Use a byte buffer for block blob uploads. Defaults to False.
|
201
|
+
:keyword int max_page_size: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024, or 4MB.
|
202
|
+
:keyword int max_single_get_size: The maximum size for a blob to be downloaded in a single call,
|
203
|
+
the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.
|
204
|
+
:keyword int max_chunk_get_size: The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024,
|
205
|
+
or 4MB.
|
169
206
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
170
207
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
171
208
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
@@ -228,7 +265,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
228
265
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
229
266
|
|
230
267
|
:return: A dict of account information (SKU and account type).
|
231
|
-
:rtype:
|
268
|
+
:rtype: Dict[str, str]
|
232
269
|
|
233
270
|
.. admonition:: Example:
|
234
271
|
|
@@ -522,7 +559,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
522
559
|
:param metadata:
|
523
560
|
A dict with name-value pairs to associate with the
|
524
561
|
container as metadata. Example: `{'Category':'test'}`
|
525
|
-
:type metadata:
|
562
|
+
:type metadata: Dict[str, str]
|
526
563
|
:param public_access:
|
527
564
|
Possible values include: 'container', 'blob'.
|
528
565
|
:type public_access: str or ~azure.storage.blob.PublicAccess
|
@@ -750,7 +787,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
750
787
|
:param snapshot:
|
751
788
|
The optional blob snapshot on which to operate. This can either be the ID of the snapshot,
|
752
789
|
or a dictionary output returned by :func:`~azure.storage.blob.BlobClient.create_snapshot()`.
|
753
|
-
:type snapshot: str or
|
790
|
+
:type snapshot: str or Dict[str, Any]
|
754
791
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
755
792
|
specifies the version of the blob to operate on.
|
756
793
|
:return: A BlobClient.
|
@@ -0,0 +1,182 @@
|
|
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
|
+
Dict,
|
13
|
+
List,
|
14
|
+
Optional,
|
15
|
+
Union,
|
16
|
+
)
|
17
|
+
from typing_extensions import Self
|
18
|
+
|
19
|
+
from azure.core import MatchConditions
|
20
|
+
from azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential, TokenCredential
|
21
|
+
from azure.core.paging import ItemPaged
|
22
|
+
from azure.core.tracing.decorator import distributed_trace
|
23
|
+
from ._blob_client import BlobClient
|
24
|
+
from ._container_client import ContainerClient
|
25
|
+
from ._encryption import StorageEncryptionMixin
|
26
|
+
from ._lease import BlobLeaseClient
|
27
|
+
from ._models import (
|
28
|
+
BlobAnalyticsLogging,
|
29
|
+
ContainerEncryptionScope,
|
30
|
+
ContainerProperties,
|
31
|
+
CorsRule,
|
32
|
+
FilteredBlob,
|
33
|
+
Metrics,
|
34
|
+
PublicAccess,
|
35
|
+
RetentionPolicy,
|
36
|
+
StaticWebsite,
|
37
|
+
)
|
38
|
+
from ._shared.base_client import StorageAccountHostsMixin
|
39
|
+
from ._shared.models import UserDelegationKey
|
40
|
+
|
41
|
+
class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
42
|
+
def __init__(
|
43
|
+
self,
|
44
|
+
account_url: str,
|
45
|
+
credential: Optional[
|
46
|
+
Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]
|
47
|
+
] = None,
|
48
|
+
*,
|
49
|
+
api_version: Optional[str] = None,
|
50
|
+
secondary_hostname: Optional[str] = None,
|
51
|
+
max_block_size: int = 4 * 1024 * 1024,
|
52
|
+
max_single_put_size: int = 64 * 1024 * 1024,
|
53
|
+
min_large_block_upload_threshold: int = 4 * 1024 * 1024 + 1,
|
54
|
+
use_byte_buffer: bool = False,
|
55
|
+
max_page_size: int = 4 * 1024 * 1024,
|
56
|
+
max_single_get_size: int = 32 * 1024 * 1024,
|
57
|
+
max_chunk_get_size: int = 4 * 1024 * 1024,
|
58
|
+
audience: Optional[str] = None,
|
59
|
+
**kwargs: Any
|
60
|
+
) -> None: ...
|
61
|
+
def __enter__(self) -> Self: ...
|
62
|
+
def __exit__(
|
63
|
+
self, typ: Optional[type[BaseException]], exc: Optional[BaseException], tb: Optional[TracebackType]
|
64
|
+
) -> None: ...
|
65
|
+
def close(self) -> None: ...
|
66
|
+
@classmethod
|
67
|
+
def from_connection_string(
|
68
|
+
cls,
|
69
|
+
conn_str: str,
|
70
|
+
credential: Optional[
|
71
|
+
Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]
|
72
|
+
] = None,
|
73
|
+
*,
|
74
|
+
api_version: Optional[str] = None,
|
75
|
+
secondary_hostname: Optional[str] = None,
|
76
|
+
max_block_size: int = 4 * 1024 * 1024,
|
77
|
+
max_single_put_size: int = 64 * 1024 * 1024,
|
78
|
+
min_large_block_upload_threshold: int = 4 * 1024 * 1024 + 1,
|
79
|
+
use_byte_buffer: bool = False,
|
80
|
+
max_page_size: int = 4 * 1024 * 1024,
|
81
|
+
max_single_get_size: int = 32 * 1024 * 1024,
|
82
|
+
max_chunk_get_size: int = 4 * 1024 * 1024,
|
83
|
+
audience: Optional[str] = None,
|
84
|
+
**kwargs: Any
|
85
|
+
) -> Self: ...
|
86
|
+
@distributed_trace
|
87
|
+
def get_user_delegation_key(
|
88
|
+
self, key_start_time: datetime, key_expiry_time: datetime, *, timeout: Optional[int] = None, **kwargs: Any
|
89
|
+
) -> UserDelegationKey: ...
|
90
|
+
@distributed_trace
|
91
|
+
def get_account_information(self, **kwargs: Any) -> Dict[str, str]: ...
|
92
|
+
@distributed_trace
|
93
|
+
def get_service_stats(self, *, timeout: Optional[int] = None, **kwargs: Any) -> Dict[str, Any]: ...
|
94
|
+
@distributed_trace
|
95
|
+
def get_service_properties(self, *, timeout: Optional[int] = None, **kwargs: Any) -> Dict[str, Any]: ...
|
96
|
+
@distributed_trace
|
97
|
+
def set_service_properties(
|
98
|
+
self,
|
99
|
+
analytics_logging: Optional[BlobAnalyticsLogging] = None,
|
100
|
+
hour_metrics: Optional[Metrics] = None,
|
101
|
+
minute_metrics: Optional[Metrics] = None,
|
102
|
+
cors: Optional[List[CorsRule]] = None,
|
103
|
+
target_version: Optional[str] = None,
|
104
|
+
delete_retention_policy: Optional[RetentionPolicy] = None,
|
105
|
+
static_website: Optional[StaticWebsite] = None,
|
106
|
+
*,
|
107
|
+
timeout: Optional[int] = None,
|
108
|
+
**kwargs: Any
|
109
|
+
) -> None: ...
|
110
|
+
@distributed_trace
|
111
|
+
def list_containers(
|
112
|
+
self,
|
113
|
+
name_starts_with: Optional[str] = None,
|
114
|
+
include_metadata: bool = False,
|
115
|
+
*,
|
116
|
+
include_deleted: Optional[bool] = None,
|
117
|
+
include_system: Optional[bool] = None,
|
118
|
+
results_per_page: Optional[int] = None,
|
119
|
+
timeout: Optional[int] = None,
|
120
|
+
**kwargs: Any
|
121
|
+
) -> ItemPaged[ContainerProperties]: ...
|
122
|
+
@distributed_trace
|
123
|
+
def find_blobs_by_tags(
|
124
|
+
self,
|
125
|
+
filter_expression: str,
|
126
|
+
*,
|
127
|
+
results_per_page: Optional[int] = None,
|
128
|
+
timeout: Optional[int] = None,
|
129
|
+
**kwargs: Any
|
130
|
+
) -> ItemPaged[FilteredBlob]: ...
|
131
|
+
@distributed_trace
|
132
|
+
def create_container(
|
133
|
+
self,
|
134
|
+
name: str,
|
135
|
+
metadata: Optional[Dict[str, str]] = None,
|
136
|
+
public_access: Optional[Union[PublicAccess, str]] = None,
|
137
|
+
*,
|
138
|
+
container_encryption_scope: Optional[Union[dict, ContainerEncryptionScope]] = None,
|
139
|
+
timeout: Optional[int] = None,
|
140
|
+
**kwargs: Any
|
141
|
+
) -> ContainerClient: ...
|
142
|
+
@distributed_trace
|
143
|
+
def delete_container(
|
144
|
+
self,
|
145
|
+
container: Union[ContainerProperties, str],
|
146
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
147
|
+
*,
|
148
|
+
if_modified_since: Optional[datetime] = None,
|
149
|
+
if_unmodified_since: Optional[datetime] = None,
|
150
|
+
etag: Optional[str] = None,
|
151
|
+
match_condition: Optional[MatchConditions] = None,
|
152
|
+
timeout: Optional[int] = None,
|
153
|
+
**kwargs: Any
|
154
|
+
) -> None: ...
|
155
|
+
@distributed_trace
|
156
|
+
def _rename_container(
|
157
|
+
self,
|
158
|
+
name: str,
|
159
|
+
new_name: str,
|
160
|
+
*,
|
161
|
+
lease: Optional[Union[BlobLeaseClient, str]] = None,
|
162
|
+
timeout: Optional[int] = None,
|
163
|
+
**kwargs: Any
|
164
|
+
) -> ContainerClient: ...
|
165
|
+
@distributed_trace
|
166
|
+
def undelete_container(
|
167
|
+
self,
|
168
|
+
deleted_container_name: str,
|
169
|
+
deleted_container_version: str,
|
170
|
+
*,
|
171
|
+
timeout: Optional[int] = None,
|
172
|
+
**kwargs: Any
|
173
|
+
) -> ContainerClient: ...
|
174
|
+
def get_container_client(self, container: Union[ContainerProperties, str]) -> ContainerClient: ...
|
175
|
+
def get_blob_client(
|
176
|
+
self,
|
177
|
+
container: Union[ContainerProperties, str],
|
178
|
+
blob: str,
|
179
|
+
snapshot: Optional[Union[Dict[str, Any], str]] = None,
|
180
|
+
*,
|
181
|
+
version_id: Optional[str] = None
|
182
|
+
) -> BlobClient: ...
|
@@ -150,6 +150,22 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
150
150
|
self._client = self._build_generated_client()
|
151
151
|
self._configure_encryption(kwargs)
|
152
152
|
|
153
|
+
def __enter__(self) -> Self:
|
154
|
+
self._client.__enter__()
|
155
|
+
return self
|
156
|
+
|
157
|
+
def __exit__(self, *args) -> None:
|
158
|
+
self._client.__exit__(*args)
|
159
|
+
|
160
|
+
def close(self) -> None:
|
161
|
+
"""This method is to close the sockets opened by the client.
|
162
|
+
It need not be used when using with a context manager.
|
163
|
+
|
164
|
+
:return: None
|
165
|
+
:rtype: None
|
166
|
+
"""
|
167
|
+
self._client.close()
|
168
|
+
|
153
169
|
def _build_generated_client(self) -> AzureBlobStorage:
|
154
170
|
client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
|
155
171
|
client._config.version = self._api_version # type: ignore [assignment] # pylint: disable=protected-access
|
@@ -796,6 +812,9 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
796
812
|
Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted', 'deletedwithversions',
|
797
813
|
'tags', 'versions', 'immutabilitypolicy', 'legalhold'.
|
798
814
|
:type include: list[str] or str
|
815
|
+
:keyword int results_per_page:
|
816
|
+
Controls the maximum number of Blobs that will be included in each page of results if using
|
817
|
+
`ItemPaged.by_page()`.
|
799
818
|
:keyword int timeout:
|
800
819
|
Sets the server-side timeout for the operation in seconds. For more details see
|
801
820
|
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
|
@@ -845,6 +864,9 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
845
864
|
:keyword str name_starts_with:
|
846
865
|
Filters the results to return only blobs whose names
|
847
866
|
begin with the specified prefix.
|
867
|
+
:keyword int results_per_page:
|
868
|
+
Controls the maximum number of Blobs that will be included in each page of results if using
|
869
|
+
`ItemPaged.by_page()`.
|
848
870
|
:keyword int timeout:
|
849
871
|
Sets the server-side timeout for the operation in seconds. For more details see
|
850
872
|
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
|
@@ -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: ...
|