Skip to content

[Storage] [Named Keywords] Blob Package #41726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def upload_blob_to_url(
:rtype: dict(str, Any)
"""
with BlobClient.from_blob_url(blob_url, credential=credential) as client:
return cast(BlobClient, client).upload_blob(data=data, blob_type=BlobType.BLOCKBLOB, **kwargs)
return client.upload_blob(data=data, blob_type=BlobType.BLOCKBLOB, **kwargs)


def _download_to_stream(client: BlobClient, handle: IO[bytes], **kwargs: Any) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from datetime import datetime
from functools import partial
from typing import (
Any, AnyStr, cast, Dict, IO, Iterable, List, Optional, overload, Tuple, Union,
Any, AnyStr, cast, Dict, IO, Iterable, List, Optional, Tuple, Union,
TYPE_CHECKING
)
from typing_extensions import Self
Expand Down Expand Up @@ -633,26 +633,6 @@ def upload_blob(
return upload_page_blob(**options)
return upload_append_blob(**options)

@overload
def download_blob(
self, offset: Optional[int] = None,
length: Optional[int] = None,
*,
encoding: str,
**kwargs: Any
) -> StorageStreamDownloader[str]:
...

@overload
def download_blob(
self, offset: Optional[int] = None,
length: Optional[int] = None,
*,
encoding: None = None,
**kwargs: Any
) -> StorageStreamDownloader[bytes]:
...

@distributed_trace
def download_blob(
self, offset: Optional[int] = None,
Expand Down
Loading