github Azure/azure-sdk-for-python azure-storage-file-share_12.0.0b5

latest releases: azure-template_0.1.0b3648299, azure-monitor-query_1.3.0, azure-ai-generative_1.0.0b8...
pre-release4 years ago

Version 12.0.0b5:

Important: This package was previously named azure-storage-file

Going forward, to use this SDK, please install azure-storage-file-share.
Additionally:

  • The namespace within the package has also been renamed to azure.storage.fileshare.
  • FileServiceClient has been renamed to ShareServiceClient.
  • DirectoryClient has been renamed to ShareDirectoryClient.
  • FileClient has been renamed to ShareFileClient.

Additional Breaking changes

  • ShareClient now accepts only account_url with mandatory a string param share_name.
    To use a share_url, the method from_share_url must be used.
  • ShareDirectoryClient now accepts only account_url with mandatory string params share_name and directory_path.
    To use a directory_url, the method from_directory_url must be used.
  • ShareFileClient now accepts only account_url with mandatory string params share_name and
    file_path. To use a file_url, the method from_file_url must be used.
  • file_permission_key parameter has been renamed to permission_key
  • set_share_access_policy has required parameter signed_identifiers.
  • NoRetry policy has been removed. Use keyword argument retry_total=0 for no retries.
  • Removed types that were accidentally exposed from two modules. Only ShareServiceClient, ShareClient, ShareDirectoryClient and ShareFileClient should be imported from azure.storage.fileshare.aio
  • Some parameters have become keyword only, rather than positional. Some examples include:
    • loop
    • max_concurrency
    • validate_content
    • timeout etc.
  • Client and model files have been made internal. Users should import from the top level modules azure.storage.fileshare and azure.storage.fileshare.aio only.
  • The generate_shared_access_signature methods on each of ShareServiceClient, ShareClient and ShareFileClient have been replaced by module level functions generate_account_sas, generate_share_sas and generate_file_sas.
  • start_range and end_range params are now renamed to and behave likeoffset and length in
    the following APIs:
    • download_file
    • upload_range
    • upload_range_from_url
    • clear_range
    • get_ranges
  • StorageStreamDownloader is no longer iterable. To iterate over the file data stream, use StorageStreamDownloader.chunks.
  • The public attributes of StorageStreamDownloader have been limited to:
    • name (str): The name of the file.
    • path (str): The full path of the file.
    • share (str): The share the file will be downloaded from.
    • properties (FileProperties): The properties of the file.
    • size (int): The size of the download. Either the total file size, or the length of a subsection if sepcified. Previously called download_size.
  • StorageStreamDownloader now has new functions:
    • readall(): Reads the complete download stream, returning bytes. This replaces the functions content_as_bytes and content_as_text which have been deprecated.
    • readinto(stream): Download the complete stream into the supplied writable stream, returning the number of bytes written. This replaces the function download_to_stream which has been deprecated.
  • ShareFileClient.close_handles and ShareDirectoryClient.close_handles have both been replaced by two functions each; close_handle(handle) and close_all_handles(). These functions are blocking and return integers (the number of closed handles) rather than polling objects.
  • get_service_properties now returns a dict with keys consistent to set_service_properties

New features

  • ResourceTypes, NTFSAttributes, and Services now have method from_string which takes parameters as a string.

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.