Skip to content
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

STG73 API Review #3

Open
wants to merge 1 commit into
base: master-apis
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
@@ -0,0 +1,5 @@
# Stubs for azure (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

__path__: str
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Stubs for azure.storage (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

__path__: str
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Stubs for azure.storage.blobchangefeed (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from ._change_feed_client import ChangeFeedClient as ChangeFeedClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Stubs for azure.storage.blobchangefeed._change_feed_client (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from ._models import ChangeFeedPaged
from azure.core.paging import ItemPaged
from azure.storage.blob import BlobServiceClient
from datetime import datetime
from typing import Any, Optional

class ChangeFeedClient:
def __init__(self, account_url: str, credential: Optional[Any]=..., **kwargs: Any) -> None: ...
@classmethod
def from_connection_string(cls: Any, conn_str: str, credential: Optional[Any]=..., **kwargs: Any) -> BlobServiceClient: ...
def list_changes(self, start_time: Optional[datetime]=..., end_time: Optional[datetime]=..., **kwargs: Any) -> ItemPaged[BlobProperties]: ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Stubs for azure.storage.blobchangefeed._models (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from azure.core.paging import PageIterator
from typing import Any, Optional

SEGMENT_COMMON_PATH: str
PATH_DELIMITER: str

class ChangeFeedPaged(PageIterator):
results_per_page: Any = ...
current_page: Any = ...
def __init__(self, container_client: Any, results_per_page: Optional[Any] = ..., start_time: Optional[Any] = ..., end_time: Optional[Any] = ..., continuation_token: Optional[Any] = ...) -> None: ...

class ChangeFeed:
client: Any = ...
page_size: Any = ...
unprocessed_segment_paths: Any = ...
current_segment: Any = ...
start_time: Any = ...
end_time: Any = ...
cursor: Any = ...
def __init__(self, client: Any, page_size: Any, start_time: Optional[Any] = ..., end_time: Optional[Any] = ..., cf_cursor: Optional[Any] = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...
next: Any = ...

class Segment:
client: Any = ...
segment_path: Any = ...
page_size: Any = ...
shards: Any = ...
cursor: Any = ...
def __init__(self, client: Any, segment_path: Any, page_size: Any, segment_cursor: Optional[Any] = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...
next: Any = ...

class Shard:
client: Any = ...
shard_path: Any = ...
current_chunk: Any = ...
unprocessed_chunk_path_props: Any = ...
cursor: Any = ...
def __init__(self, client: Any, shard_path: Any, shard_cursor: Optional[Any] = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...
next: Any = ...

class Chunk:
client: Any = ...
chunk_path: Any = ...
file_reader: Any = ...
cursor: Any = ...
def __init__(self, client: Any, chunk_path: Any, chunk_cursor: Optional[Any] = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...
next: Any = ...

class ChangeFeedStreamer:
event_position: Any = ...
block_count: Any = ...
def __init__(self, blob_client: Any, chunk_file_start: int = ..., block_count: int = ...) -> None: ...
def __len__(self): ...
def __iter__(self): ...
def seekable(self): ...
def next(self): ...
def tell(self): ...
def seek(self, offset: Any, whence: int = ...) -> None: ...
def read(self, size: Any): ...
def track_event_position(self) -> None: ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Stubs for azure.storage.blobchangefeed._version (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

VERSION: str
12 changes: 12 additions & 0 deletions sdk/storage/azure-storage-blob-changefeed/out/setup.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Stubs for setup (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

PACKAGE_NAME: str
NAMESPACE_NAME: str
PACKAGE_PPRINT_NAME: str
package_folder_path: Any
ver: Any
version: Any
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ from ._container_client import ContainerClient as ContainerClient
from ._download import StorageStreamDownloader as StorageStreamDownloader
from ._generated.models import RehydratePriority as RehydratePriority
from ._lease import BlobLeaseClient as BlobLeaseClient
from ._models import AccessPolicy as AccessPolicy, BlobAnalyticsLogging as BlobAnalyticsLogging, BlobBlock as BlobBlock, BlobProperties as BlobProperties, BlobSasPermissions as BlobSasPermissions, BlobType as BlobType, BlockState as BlockState, ContainerEncryptionScope as ContainerEncryptionScope, ContainerProperties as ContainerProperties, ContainerSasPermissions as ContainerSasPermissions, ContentSettings as ContentSettings, CopyProperties as CopyProperties, CorsRule as CorsRule, CustomerProvidedEncryptionKey as CustomerProvidedEncryptionKey, LeaseProperties as LeaseProperties, Metrics as Metrics, PageRange as PageRange, PremiumPageBlobTier as PremiumPageBlobTier, PublicAccess as PublicAccess, RetentionPolicy as RetentionPolicy, SequenceNumberAction as SequenceNumberAction, StandardBlobTier as StandardBlobTier, StaticWebsite as StaticWebsite
from ._models import AccessPolicy as AccessPolicy, BlobAnalyticsLogging as BlobAnalyticsLogging, BlobBlock as BlobBlock, BlobProperties as BlobProperties, BlobSasPermissions as BlobSasPermissions, BlobType as BlobType, BlockState as BlockState, ContainerEncryptionScope as ContainerEncryptionScope, ContainerProperties as ContainerProperties, ContainerSasPermissions as ContainerSasPermissions, ContentSettings as ContentSettings, CopyProperties as CopyProperties, CorsRule as CorsRule, CustomerProvidedEncryptionKey as CustomerProvidedEncryptionKey, DelimitedTextConfiguration as DelimitedTextConfiguration, FilteredBlob as FilteredBlob, JsonTextConfiguration as JsonTextConfiguration, LeaseProperties as LeaseProperties, Metrics as Metrics, PageRange as PageRange, PremiumPageBlobTier as PremiumPageBlobTier, PublicAccess as PublicAccess, QuickQueryError as QuickQueryError, RetentionPolicy as RetentionPolicy, SequenceNumberAction as SequenceNumberAction, StandardBlobTier as StandardBlobTier, StaticWebsite as StaticWebsite
from ._quick_query_helper import QuickQueryReader as QuickQueryReader
from ._shared.models import AccountSasPermissions as AccountSasPermissions, LocationMode as LocationMode, ResourceTypes as ResourceTypes, StorageErrorCode as StorageErrorCode, UserDelegationKey as UserDelegationKey
from ._shared.policies import ExponentialRetry as ExponentialRetry, LinearRetry as LinearRetry
from ._shared.response_handlers import PartialBatchErrorException as PartialBatchErrorException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
from ._deserialize import deserialize_blob_properties, deserialize_blob_stream, get_page_ranges_result
from ._download import StorageStreamDownloader
from ._generated import AzureBlobStorage, VERSION
from ._generated.models import AppendPositionAccessConditions, BlobHTTPHeaders, BlockList, BlockLookupList, CpkInfo, DeleteSnapshotsOptionType, SequenceNumberAccessConditions, StorageErrorException, UserDelegationKey
from ._generated.models import AppendPositionAccessConditions, BlobHTTPHeaders, BlockList, BlockLookupList, CpkInfo, DeleteSnapshotsOptionType, QueryRequest, SequenceNumberAccessConditions, StorageErrorException
from ._lease import BlobLeaseClient, get_access_conditions
from ._models import BlobBlock, BlobProperties, BlobSasPermissions, BlobType, ContainerProperties, ContentSettings, PremiumPageBlobTier, SequenceNumberAction, StandardBlobTier
from ._serialize import get_api_version, get_cpk_scope_info, get_modify_conditions, get_source_conditions
from ._models import BlobBlock, BlobProperties, BlobType, ContentSettings, PremiumPageBlobTier, SequenceNumberAction, StandardBlobTier
from ._quick_query_helper import QuickQueryReader
from ._serialize import get_api_version, get_cpk_scope_info, get_modify_conditions, get_quick_query_serialization_info, get_source_conditions, serialize_blob_tags, serialize_blob_tags_header
from ._shared import encode_base64
from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query
from ._shared.encryption import generate_blob_encryption_data
from ._shared.request_handlers import add_metadata_headers, get_length, read_length, validate_and_format_range_headers
from ._shared.response_handlers import process_storage_error, return_response_headers
from ._shared.response_handlers import process_storage_error, return_headers_and_deserialized, return_response_headers
from ._shared.uploads import IterStreamer
from ._upload_helpers import upload_append_blob, upload_block_blob, upload_page_blob
from datetime import datetime
Expand All @@ -23,6 +24,7 @@ class BlobClient(StorageAccountHostsMixin):
container_name: Any = ...
blob_name: Any = ...
snapshot: Any = ...
version_id: Any = ...
def __init__(self, account_url: str, container_name: str, blob_name: str, snapshot: Optional[Union[str, Dict[str, Any]]]=..., credential: Optional[Any]=..., **kwargs: Any) -> None: ...
@classmethod
def from_blob_url(cls: Any, blob_url: str, credential: Optional[Any]=..., snapshot: Optional[Union[str, Dict[str, Any]]]=..., **kwargs: Any) -> BlobClient: ...
Expand All @@ -31,6 +33,7 @@ class BlobClient(StorageAccountHostsMixin):
def get_account_information(self, **kwargs: Any) -> Dict[str, str]: ...
def upload_blob(self, data: Union[Iterable[AnyStr], IO[AnyStr]], blob_type: Union[str, BlobType]=..., length: Optional[int]=..., metadata: Optional[Dict[str, str]]=..., **kwargs: Any) -> Any: ...
def download_blob(self, offset: Optional[int]=..., length: Optional[int]=..., **kwargs: Any) -> StorageStreamDownloader: ...
def query(self, query_expression: str, **kwargs: Any) -> QuickQueryReader: ...
def delete_blob(self, delete_snapshots: bool=..., **kwargs: Any) -> None: ...
def undelete_blob(self, **kwargs: Any) -> None: ...
def get_blob_properties(self, **kwargs: Any) -> BlobProperties: ...
Expand All @@ -48,6 +51,8 @@ class BlobClient(StorageAccountHostsMixin):
def get_block_list(self, block_list_type: Optional[str]=..., **kwargs: Any) -> Tuple[List[BlobBlock], List[BlobBlock]]: ...
def commit_block_list(self, block_list: List[BlobBlock], content_settings: Optional[ContentSettings]=..., metadata: Optional[Dict[str, str]]=..., **kwargs: Any) -> Dict[str, Union[str, datetime]]: ...
def set_premium_page_blob_tier(self, premium_page_blob_tier: Union[str, PremiumPageBlobTier], **kwargs: Any) -> None: ...
def set_blob_tags(self, tags: Optional[Dict[str, str]]=..., **kwargs: Any) -> Dict[str, Any]: ...
def get_blob_tags(self, **kwargs: Any) -> Dict[str, str]: ...
def get_page_ranges(self, offset: Optional[int]=..., length: Optional[int]=..., previous_snapshot_diff: Optional[Union[str, Dict[str, Any]]]=..., **kwargs: Any) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: ...
def get_page_range_diff_for_managed_disk(self, previous_snapshot_url: str, offset: Optional[int]=..., length: Optional[int]=..., **kwargs: Any) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: ...
def set_sequence_number(self, sequence_number_action: Union[str, SequenceNumberAction], sequence_number: Optional[str]=..., **kwargs: Any) -> Dict[str, Union[str, datetime]]: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from ._deserialize import service_properties_deserialize, service_stats_deserial
from ._generated import AzureBlobStorage, VERSION
from ._generated.models import KeyInfo, StorageErrorException, StorageServiceProperties
from ._lease import BlobLeaseClient
from ._models import BlobAnalyticsLogging, BlobProperties, ContainerProperties, ContainerPropertiesPaged, CorsRule, Metrics, PublicAccess, RetentionPolicy, StaticWebsite
from ._models import BlobAnalyticsLogging, BlobProperties, ContainerProperties, ContainerPropertiesPaged, CorsRule, FilteredBlobPaged, Metrics, PublicAccess, RetentionPolicy, StaticWebsite
from ._serialize import get_api_version
from ._shared.base_client import StorageAccountHostsMixin, TransportWrapper, parse_connection_str, parse_query
from ._shared.models import LocationMode, UserDelegationKey
Expand All @@ -28,6 +28,7 @@ class BlobServiceClient(StorageAccountHostsMixin):
def get_service_properties(self, **kwargs: Any) -> Dict[str, Any]: ...
def set_service_properties(self, analytics_logging: Optional[BlobAnalyticsLogging]=..., hour_metrics: Optional[Metrics]=..., minute_metrics: Optional[Metrics]=..., cors: Optional[List[CorsRule]]=..., target_version: Optional[str]=..., delete_retention_policy: Optional[RetentionPolicy]=..., static_website: Optional[StaticWebsite]=..., **kwargs: Any) -> None: ...
def list_containers(self, name_starts_with: Optional[str]=..., include_metadata: Optional[bool]=..., **kwargs: Any) -> ItemPaged[ContainerProperties]: ...
def filter_blobs(self, where: Optional[Any]=..., **kwargs: Any) -> ItemPaged[BlobProperties]: ...
def create_container(self, name: str, metadata: Optional[Dict[str, str]]=..., public_access: Optional[Union[PublicAccess, str]]=..., **kwargs: Any) -> ContainerClient: ...
def delete_container(self, container: Union[ContainerProperties, str], lease: Optional[Union[BlobLeaseClient, str]]=..., **kwargs: Any) -> None: ...
def get_container_client(self, container: Union[ContainerProperties, str]) -> ContainerClient: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ from ._shared.response_handlers import process_storage_error, return_headers_and
from azure.core.paging import ItemPaged
from azure.core.pipeline.transport import HttpResponse
from datetime import datetime
from typing import Any, AnyStr, Dict, IO, Iterable, Iterator, Optional, Union
from typing import Any, AnyStr, Dict, IO, Iterable, Iterator, List, Optional, Union

class ContainerClient(StorageAccountHostsMixin):
container_name: Any = ...
Expand All @@ -26,13 +26,14 @@ class ContainerClient(StorageAccountHostsMixin):
def from_connection_string(cls: Any, conn_str: str, container_name: str, credential: Optional[Any]=..., **kwargs: Any) -> ContainerClient: ...
def create_container(self, metadata: Optional[Dict[str, str]]=..., public_access: Optional[Union[PublicAccess, str]]=..., **kwargs: Any) -> None: ...
def delete_container(self, **kwargs: Any) -> None: ...
def undelete_container(self, deleted_container_name: str, deleted_container_version: str, **kwargs: Any) -> None: ...
def acquire_lease(self, lease_duration: int=..., lease_id: Optional[str]=..., **kwargs: Any) -> BlobLeaseClient: ...
def get_account_information(self, **kwargs: Any) -> Dict[str, str]: ...
def get_container_properties(self, **kwargs: Any) -> ContainerProperties: ...
def set_container_metadata(self, metadata: Optional[Dict[str, str]]=..., **kwargs: Any) -> Dict[str, Union[str, datetime]]: ...
def get_container_access_policy(self, **kwargs: Any) -> Dict[str, Any]: ...
def set_container_access_policy(self, signed_identifiers: Dict[str, AccessPolicy], public_access: Optional[Union[str, PublicAccess]]=..., **kwargs: Any) -> Dict[str, Union[str, datetime]]: ...
def list_blobs(self, name_starts_with: Optional[str]=..., include: Optional[Any]=..., **kwargs: Any) -> ItemPaged[BlobProperties]: ...
def list_blobs(self, name_starts_with: Optional[str]=..., include: Optional[Union[str, List[str]]]=..., **kwargs: Any) -> ItemPaged[BlobProperties]: ...
def walk_blobs(self, name_starts_with: Optional[str]=..., include: Optional[Any]=..., delimiter: str=..., **kwargs: Optional[Any]) -> ItemPaged[BlobProperties]: ...
def upload_blob(self, name: Union[str, BlobProperties], data: Union[Iterable[AnyStr], IO[AnyStr]], blob_type: Union[str, BlobType]=..., length: Optional[int]=..., metadata: Optional[Dict[str, str]]=..., **kwargs: Any) -> BlobClient: ...
def delete_blob(self, blob: Union[str, BlobProperties], delete_snapshots: Optional[str]=..., **kwargs: Any) -> None: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from ._generated.models import AccessPolicy as GenAccessPolicy, BlobItem, CorsRule as GeneratedCorsRule, Logging as GeneratedLogging, Metrics as GeneratedMetrics, RetentionPolicy as GeneratedRetentionPolicy, StaticWebsite as GeneratedStaticWebsite, StorageErrorException
from ._generated.models import AccessPolicy as GenAccessPolicy, BlobItemInternal, CorsRule as GeneratedCorsRule, DelimitedTextConfiguration as GenDelimitedTextConfiguration, JsonTextConfiguration as GenJsonTextConfiguration, Logging as GeneratedLogging, Metrics as GeneratedMetrics, RetentionPolicy as GeneratedRetentionPolicy, StaticWebsite as GeneratedStaticWebsite, StorageErrorException
from ._shared import decode_base64_to_text
from ._shared.models import DictMixin, get_enum_value
from ._shared.response_handlers import process_storage_error, return_context_and_deserialized
from azure.core.paging import ItemPaged, PageIterator
from azure.storage.blob._generated.models import FilterBlobItem
from enum import Enum
from typing import Any, Optional

Expand Down Expand Up @@ -86,6 +87,8 @@ class ContainerProperties(DictMixin):
lease: Any = ...
public_access: Any = ...
has_immutability_policy: Any = ...
deleted: Any = ...
version: Any = ...
has_legal_hold: Any = ...
metadata: Any = ...
encryption_scope: Any = ...
Expand All @@ -104,6 +107,8 @@ class BlobProperties(DictMixin):
name: Any = ...
container: Any = ...
snapshot: Any = ...
version_id: Any = ...
is_current_version: Any = ...
blob_type: Any = ...
metadata: Any = ...
encrypted_metadata: Any = ...
Expand All @@ -128,6 +133,8 @@ class BlobProperties(DictMixin):
encryption_key_sha256: Any = ...
encryption_scope: Any = ...
request_server_encrypted: Any = ...
tag_count: Any = ...
tags: Any = ...
def __init__(self, **kwargs: Any) -> None: ...

class BlobPropertiesPaged(PageIterator):
Expand All @@ -141,6 +148,18 @@ class BlobPropertiesPaged(PageIterator):
location_mode: Any = ...
def __init__(self, command: Any, container: Optional[Any] = ..., prefix: Optional[Any] = ..., results_per_page: Optional[Any] = ..., continuation_token: Optional[Any] = ..., delimiter: Optional[Any] = ..., location_mode: Optional[Any] = ...) -> None: ...

class FilteredBlob(FilterBlobItem):
def __init__(self, **kwargs: Any) -> None: ...

class FilteredBlobPaged(PageIterator):
service_endpoint: Any = ...
marker: Any = ...
results_per_page: Any = ...
container: Any = ...
current_page: Any = ...
location_mode: Any = ...
def __init__(self, command: Any, container: Optional[Any] = ..., results_per_page: Optional[Any] = ..., continuation_token: Optional[Any] = ..., location_mode: Optional[Any] = ...) -> None: ...

class BlobPrefix(ItemPaged, DictMixin):
name: Any = ...
prefix: Any = ...
Expand Down Expand Up @@ -212,7 +231,8 @@ class BlobSasPermissions:
create: Any = ...
write: Any = ...
delete: Any = ...
def __init__(self, read: bool = ..., add: bool = ..., create: bool = ..., write: bool = ..., delete: bool = ...) -> None: ...
delete_version: Any = ...
def __init__(self, read: bool = ..., add: bool = ..., create: bool = ..., write: bool = ..., delete: bool = ..., delete_version: bool = ...) -> None: ...
@classmethod
def from_string(cls, permission: Any): ...

Expand All @@ -226,3 +246,16 @@ class ContainerEncryptionScope:
default_encryption_scope: Any = ...
prevent_encryption_scope_override: Any = ...
def __init__(self, default_encryption_scope: Any, **kwargs: Any) -> None: ...

class DelimitedTextConfiguration(GenDelimitedTextConfiguration):
def __init__(self, **kwargs: Any) -> None: ...

class JsonTextConfiguration(GenJsonTextConfiguration):
def __init__(self, **kwargs: Any) -> None: ...

class QuickQueryError:
name: Any = ...
is_fatal: Any = ...
description: Any = ...
position: Any = ...
def __init__(self, name: Optional[Any] = ..., is_fatal: bool = ..., description: Optional[Any] = ..., position: Optional[Any] = ...) -> None: ...
Loading