Azure Storage File Share client library for Python
Azure File Share storage offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol. Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. Additionally, Azure file shares can be cached on Windows Servers with Azure File Sync for fast access near where the data is being used.
Azure file shares can be used to:
Replace or supplement on-premises file servers
“Lift and shift” applications
Simplify cloud development with shared application settings, diagnostic share, and Dev/Test/Debug tools
Source code | Package (PyPI) | Package (Conda) | API reference documentation | Product documentation | Samples
Getting started
Prerequisites
Python 3.8 or later is required to use this package. For more details, please read our page on Azure SDK for Python version support policy.
You must have an Azure subscription and an Azure storage account to use this package.
Install the package
Install the Azure Storage File Share client library for Python with pip:
pip install azure-storage-file-share
Create a storage account
If you wish to create a new storage account, you can use the Azure Portal, Azure PowerShell, or Azure CLI:
# Create a new resource group to hold the storage account -
# if using an existing resource group, skip this step
az group create --name my-resource-group --location westus2
# Create the storage account
az storage account create -n my-storage-account-name -g my-resource-group
Create the client
The Azure Storage File Share client library for Python allows you to interact with four types of resources: the storage account itself, file shares, directories, and files. Interaction with these resources starts with an instance of a client. To create a client object, you will need the storage account’s file service URL and a credential that allows you to access the storage account:
from azure.storage.fileshare import ShareServiceClient
service = ShareServiceClient(account_url="https://<my-storage-account-name>.file.core.windows.net/", credential=credential)
Looking up the account URL
You can find the storage account’s file service URL using the Azure Portal, Azure PowerShell, or Azure CLI:
# Get the file service URL for the storage account
az storage account show -n my-storage-account-name -g my-resource-group --query "primaryEndpoints.file"
Types of credentials
The credential
parameter may be provided in a number of different forms, depending on the type of
authorization you wish to use:
To use a shared access signature (SAS) token, provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under “Shared access signature” or use one of the
generate_sas()
functions to create a sas token for the storage account, share, or file:from datetime import datetime, timedelta from azure.storage.fileshare import ShareServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions sas_token = generate_account_sas( account_name="<storage-account-name>", account_key="<account-access-key>", resource_types=ResourceTypes(service=True), permission=AccountSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1) ) share_service_client = ShareServiceClient(account_url="https://<my_account_name>.file.core.windows.net", credential=sas_token)
To use a storage account shared key (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the “Access Keys” section or by running the following Azure CLI command:
az storage account keys list -g MyResourceGroup -n MyStorageAccount
Use the key as the credential parameter to authenticate the client:
from azure.storage.fileshare import ShareServiceClient service = ShareServiceClient(account_url="https://<my_account_name>.file.core.windows.net", credential="<account_access_key>")
Creating the client from a connection string
Depending on your use case and authorization method, you may prefer to initialize a client instance with a storage
connection string instead of providing the account URL and credential separately. To do this, pass the storage
connection string to the client’s from_connection_string
class method:
from azure.storage.fileshare import ShareServiceClient
connection_string = "DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net"
service = ShareServiceClient.from_connection_string(conn_str=connection_string)
The connection string to your storage account can be found in the Azure Portal under the “Access Keys” section or by running the following CLI command:
az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount
Key concepts
The following components make up the Azure File Share Service:
The storage account itself
A file share within the storage account
An optional hierarchy of directories within the file share
A file within the file share, which may be up to 1 TiB in size
The Azure Storage File Share client library for Python allows you to interact with each of these components through the use of a dedicated client object.
Async Clients
This library includes a complete async API supported on Python 3.5+. To use it, you must first install an async transport, such as aiohttp. See azure-core documentation for more information.
Async clients and credentials should be closed when they’re no longer needed. These
objects are async context managers and define async close
methods.
Clients
Four different clients are provided to interact with the various components of the File Share Service:
ShareServiceClient - this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured client instances to access the file shares within. It provides operations to retrieve and configure the service properties as well as list, create, and delete shares within the account. To perform operations on a specific share, retrieve a client using the
get_share_client
method.ShareClient - this client represents interaction with a specific file share (which need not exist yet), and allows you to acquire preconfigured client instances to access the directories and files within. It provides operations to create, delete, configure, or create snapshots of a share and includes operations to create and enumerate the contents of directories within it. To perform operations on a specific directory or file, retrieve a client using the
get_directory_client
orget_file_client
methods.ShareDirectoryClient - this client represents interaction with a specific directory (which need not exist yet). It provides operations to create, delete, or enumerate the contents of an immediate or nested subdirectory, and includes operations to create and delete files within it. For operations relating to a specific subdirectory or file, a client for that entity can also be retrieved using the
get_subdirectory_client
andget_file_client
functions.ShareFileClient - this client represents interaction with a specific file (which need not exist yet). It provides operations to upload, download, create, delete, and copy a file.
For details on path naming restrictions, see Naming and Referencing Shares, Directories, Files, and Metadata.
Examples
The following sections provide several code snippets covering some of the most common Storage File Share tasks, including:
Creating a file share
Create a file share to store your files
from azure.storage.fileshare import ShareClient
share = ShareClient.from_connection_string(conn_str="<connection_string>", share_name="myshare")
share.create_share()
Use the async client to create a file share
from azure.storage.fileshare.aio import ShareClient
share = ShareClient.from_connection_string(conn_str="<connection_string>", share_name="myshare")
await share.create_share()
Uploading a file
Upload a file to the share
from azure.storage.fileshare import ShareFileClient
file_client = ShareFileClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", file_path="my_file")
with open("./SampleSource.txt", "rb") as source_file:
file_client.upload_file(source_file)
Upload a file asynchronously
from azure.storage.fileshare.aio import ShareFileClient
file_client = ShareFileClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", file_path="my_file")
with open("./SampleSource.txt", "rb") as source_file:
await file_client.upload_file(source_file)
Downloading a file
Download a file from the share
from azure.storage.fileshare import ShareFileClient
file_client = ShareFileClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", file_path="my_file")
with open("DEST_FILE", "wb") as file_handle:
data = file_client.download_file()
data.readinto(file_handle)
Download a file asynchronously
from azure.storage.fileshare.aio import ShareFileClient
file_client = ShareFileClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", file_path="my_file")
with open("DEST_FILE", "wb") as file_handle:
data = await file_client.download_file()
await data.readinto(file_handle)
Listing contents of a directory
List all directories and files under a parent directory
from azure.storage.fileshare import ShareDirectoryClient
parent_dir = ShareDirectoryClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", directory_path="parent_dir")
my_list = list(parent_dir.list_directories_and_files())
print(my_list)
List contents of a directory asynchronously
from azure.storage.fileshare.aio import ShareDirectoryClient
parent_dir = ShareDirectoryClient.from_connection_string(conn_str="<connection_string>", share_name="myshare", directory_path="parent_dir")
my_files = []
async for item in parent_dir.list_directories_and_files():
my_files.append(item)
print(my_files)
Optional Configuration
Optional keyword arguments that can be passed in at the client and per-operation level.
Retry Policy configuration
Use the following keyword arguments when instantiating a client to configure the retry policy:
retry_total (int): Total number of retries to allow. Takes precedence over other counts. Pass in
retry_total=0
if you do not want to retry on requests. Defaults to 10.retry_connect (int): How many connection-related errors to retry on. Defaults to 3.
retry_read (int): How many times to retry on read errors. Defaults to 3.
retry_status (int): How many times to retry on bad status codes. Defaults to 3.
retry_to_secondary (bool): Whether the request should be retried to secondary, if able. This should only be enabled of RA-GRS accounts are used and potentially stale data can be handled. Defaults to
False
.
Other client / per-operation configuration
Other optional configuration keyword arguments that can be specified on the client or per-operation.
Client keyword arguments:
connection_timeout (int): The number of seconds the client will wait to establish a connection to the server. Defaults to 20 seconds.
read_timeout (int): The number of seconds the client will wait, between consecutive read operations, for a response from the server. This is a socket level timeout and is not affected by overall data size. Client-side read timeouts will be automatically retried. Defaults to 60 seconds.
transport (Any): User-provided transport to send the HTTP request.
Per-operation keyword arguments:
raw_response_hook (callable): The given callback uses the response returned from the service.
raw_request_hook (callable): The given callback uses the request before being sent to service.
client_request_id (str): Optional user specified identification of the request.
user_agent (str): Appends the custom value to the user-agent header to be sent with the request.
logging_enable (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at the client level to enable it for all requests.
logging_body (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at the client level to enable it for all requests.
headers (dict): Pass in custom headers as key, value pairs. E.g.
headers={'CustomValue': value}
Troubleshooting
General
Storage File clients raise exceptions defined in Azure Core.
This list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the error_code
attribute, i.e, exception.error_code
.
Logging
This library uses the standard logging library for logging. Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO level.
Detailed DEBUG level logging, including request/response bodies and unredacted
headers, can be enabled on a client with the logging_enable
argument:
import sys
import logging
from azure.storage.fileshare import ShareServiceClient
# Create a logger for the 'azure.storage.fileshare' SDK
logger = logging.getLogger('azure.storage.fileshare')
logger.setLevel(logging.DEBUG)
# Configure a console output
handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)
# This client will log detailed information about its HTTP sessions, at DEBUG level
service_client = ShareServiceClient.from_connection_string("your_connection_string", logging_enable=True)
Similarly, logging_enable
can enable detailed logging for a single operation,
even when it isn’t enabled for the client:
service_client.get_service_properties(logging_enable=True)
Next steps
More sample code
Get started with our File Share samples.
Several Storage File Share Python SDK samples are available to you in the SDK’s GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage File Share:
file_samples_hello_world.py (async version) - Examples found in this article:
Client creation
Create a file share
Upload a file
file_samples_authentication.py (async version) - Examples for authenticating and creating the client:
From a connection string
From a shared access key
From a shared access signature token
file_samples_service.py (async version) - Examples for interacting with the file service:
Get and set service properties
Create, list, and delete shares
Get a share client
file_samples_share.py (async version) - Examples for interacting with file shares:
Create a share snapshot
Set share quota and metadata
List directories and files
Get the directory or file client to interact with a specific entity
file_samples_directory.py (async version) - Examples for interacting with directories:
Create a directory and add files
Create and delete subdirectories
Get the subdirectory client
file_samples_client.py (async version) - Examples for interacting with files:
Create, upload, download, and delete files
Copy a file from a URL
Additional documentation
For more extensive documentation on Azure File Share storage, see the Azure File Share storage documentation on learn.microsoft.com.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Indices and tables
Developer Documentation
- azure.storage.fileshare package
AccessPolicy
AccountSasPermissions
AccountSasPermissions.from_string()
AccountSasPermissions.add
AccountSasPermissions.create
AccountSasPermissions.delete
AccountSasPermissions.delete_previous_version
AccountSasPermissions.filter_by_tags
AccountSasPermissions.list
AccountSasPermissions.permanent_delete
AccountSasPermissions.process
AccountSasPermissions.read
AccountSasPermissions.set_immutability_policy
AccountSasPermissions.tag
AccountSasPermissions.update
AccountSasPermissions.write
ContentSettings
ContentSettings.get()
ContentSettings.has_key()
ContentSettings.items()
ContentSettings.keys()
ContentSettings.update()
ContentSettings.values()
ContentSettings.cache_control
ContentSettings.content_disposition
ContentSettings.content_encoding
ContentSettings.content_language
ContentSettings.content_md5
ContentSettings.content_type
CorsRule
DirectoryProperties
DirectoryProperties.get()
DirectoryProperties.has_key()
DirectoryProperties.items()
DirectoryProperties.keys()
DirectoryProperties.update()
DirectoryProperties.values()
DirectoryProperties.change_time
DirectoryProperties.creation_time
DirectoryProperties.etag
DirectoryProperties.file_attributes
DirectoryProperties.file_id
DirectoryProperties.file_mode
DirectoryProperties.group
DirectoryProperties.is_directory
DirectoryProperties.last_access_time
DirectoryProperties.last_modified
DirectoryProperties.last_write_time
DirectoryProperties.metadata
DirectoryProperties.name
DirectoryProperties.nfs_file_type
DirectoryProperties.owner
DirectoryProperties.parent_id
DirectoryProperties.permission_key
DirectoryProperties.server_encrypted
ExponentialRetry
ExponentialRetry.configure_retries()
ExponentialRetry.get_backoff_time()
ExponentialRetry.increment()
ExponentialRetry.send()
ExponentialRetry.sleep()
ExponentialRetry.connect_retries
ExponentialRetry.increment_base
ExponentialRetry.initial_backoff
ExponentialRetry.next
ExponentialRetry.random_jitter_range
ExponentialRetry.retry_read
ExponentialRetry.retry_status
ExponentialRetry.retry_to_secondary
ExponentialRetry.total_retries
FileProperties
FileProperties.get()
FileProperties.has_key()
FileProperties.items()
FileProperties.keys()
FileProperties.update()
FileProperties.values()
FileProperties.change_time
FileProperties.content_length
FileProperties.content_range
FileProperties.content_settings
FileProperties.copy
FileProperties.creation_time
FileProperties.etag
FileProperties.file_attributes
FileProperties.file_id
FileProperties.file_mode
FileProperties.file_type
FileProperties.group
FileProperties.is_directory
FileProperties.last_access_time
FileProperties.last_modified
FileProperties.last_write_time
FileProperties.lease
FileProperties.link_count
FileProperties.metadata
FileProperties.name
FileProperties.nfs_file_type
FileProperties.owner
FileProperties.parent_id
FileProperties.path
FileProperties.permission_key
FileProperties.server_encrypted
FileProperties.share
FileProperties.size
FileProperties.snapshot
FileSasPermissions
Handle
LinearRetry
LinearRetry.configure_retries()
LinearRetry.get_backoff_time()
LinearRetry.increment()
LinearRetry.send()
LinearRetry.sleep()
LinearRetry.connect_retries
LinearRetry.initial_backoff
LinearRetry.next
LinearRetry.random_jitter_range
LinearRetry.retry_read
LinearRetry.retry_status
LinearRetry.retry_to_secondary
LinearRetry.total_retries
LocationMode
Metrics
NTFSAttributes
ResourceTypes
RetentionPolicy
Services
ShareAccessTier
ShareAccessTier.maketrans()
ShareAccessTier.capitalize()
ShareAccessTier.casefold()
ShareAccessTier.center()
ShareAccessTier.count()
ShareAccessTier.encode()
ShareAccessTier.endswith()
ShareAccessTier.expandtabs()
ShareAccessTier.find()
ShareAccessTier.format()
ShareAccessTier.format_map()
ShareAccessTier.index()
ShareAccessTier.isalnum()
ShareAccessTier.isalpha()
ShareAccessTier.isascii()
ShareAccessTier.isdecimal()
ShareAccessTier.isdigit()
ShareAccessTier.isidentifier()
ShareAccessTier.islower()
ShareAccessTier.isnumeric()
ShareAccessTier.isprintable()
ShareAccessTier.isspace()
ShareAccessTier.istitle()
ShareAccessTier.isupper()
ShareAccessTier.join()
ShareAccessTier.ljust()
ShareAccessTier.lower()
ShareAccessTier.lstrip()
ShareAccessTier.partition()
ShareAccessTier.removeprefix()
ShareAccessTier.removesuffix()
ShareAccessTier.replace()
ShareAccessTier.rfind()
ShareAccessTier.rindex()
ShareAccessTier.rjust()
ShareAccessTier.rpartition()
ShareAccessTier.rsplit()
ShareAccessTier.rstrip()
ShareAccessTier.split()
ShareAccessTier.splitlines()
ShareAccessTier.startswith()
ShareAccessTier.strip()
ShareAccessTier.swapcase()
ShareAccessTier.title()
ShareAccessTier.translate()
ShareAccessTier.upper()
ShareAccessTier.zfill()
ShareAccessTier.COOL
ShareAccessTier.HOT
ShareAccessTier.PREMIUM
ShareAccessTier.TRANSACTION_OPTIMIZED
ShareClient
ShareClient.from_connection_string()
ShareClient.from_share_url()
ShareClient.acquire_lease()
ShareClient.close()
ShareClient.create_directory()
ShareClient.create_permission_for_share()
ShareClient.create_share()
ShareClient.create_snapshot()
ShareClient.delete_directory()
ShareClient.delete_share()
ShareClient.get_directory_client()
ShareClient.get_file_client()
ShareClient.get_permission_for_share()
ShareClient.get_share_access_policy()
ShareClient.get_share_properties()
ShareClient.get_share_stats()
ShareClient.list_directories_and_files()
ShareClient.set_share_access_policy()
ShareClient.set_share_metadata()
ShareClient.set_share_properties()
ShareClient.set_share_quota()
ShareClient.api_version
ShareClient.location_mode
ShareClient.primary_endpoint
ShareClient.primary_hostname
ShareClient.secondary_endpoint
ShareClient.secondary_hostname
ShareClient.url
ShareDirectoryClient
ShareDirectoryClient.from_connection_string()
ShareDirectoryClient.from_directory_url()
ShareDirectoryClient.close()
ShareDirectoryClient.close_all_handles()
ShareDirectoryClient.close_handle()
ShareDirectoryClient.create_directory()
ShareDirectoryClient.create_subdirectory()
ShareDirectoryClient.delete_directory()
ShareDirectoryClient.delete_file()
ShareDirectoryClient.delete_subdirectory()
ShareDirectoryClient.exists()
ShareDirectoryClient.get_directory_properties()
ShareDirectoryClient.get_file_client()
ShareDirectoryClient.get_subdirectory_client()
ShareDirectoryClient.list_directories_and_files()
ShareDirectoryClient.list_handles()
ShareDirectoryClient.rename_directory()
ShareDirectoryClient.set_directory_metadata()
ShareDirectoryClient.set_http_headers()
ShareDirectoryClient.upload_file()
ShareDirectoryClient.api_version
ShareDirectoryClient.location_mode
ShareDirectoryClient.primary_endpoint
ShareDirectoryClient.primary_hostname
ShareDirectoryClient.secondary_endpoint
ShareDirectoryClient.secondary_hostname
ShareDirectoryClient.url
ShareFileClient
ShareFileClient.from_connection_string()
ShareFileClient.from_file_url()
ShareFileClient.abort_copy()
ShareFileClient.acquire_lease()
ShareFileClient.clear_range()
ShareFileClient.close()
ShareFileClient.close_all_handles()
ShareFileClient.close_handle()
ShareFileClient.create_file()
ShareFileClient.create_hardlink()
ShareFileClient.create_symlink()
ShareFileClient.delete_file()
ShareFileClient.download_file()
ShareFileClient.exists()
ShareFileClient.get_file_properties()
ShareFileClient.get_ranges()
ShareFileClient.get_ranges_diff()
ShareFileClient.get_symlink()
ShareFileClient.list_handles()
ShareFileClient.rename_file()
ShareFileClient.resize_file()
ShareFileClient.set_file_metadata()
ShareFileClient.set_http_headers()
ShareFileClient.start_copy_from_url()
ShareFileClient.upload_file()
ShareFileClient.upload_range()
ShareFileClient.upload_range_from_url()
ShareFileClient.api_version
ShareFileClient.location_mode
ShareFileClient.primary_endpoint
ShareFileClient.primary_hostname
ShareFileClient.secondary_endpoint
ShareFileClient.secondary_hostname
ShareFileClient.url
ShareLeaseClient
ShareProperties
ShareProperties.get()
ShareProperties.has_key()
ShareProperties.items()
ShareProperties.keys()
ShareProperties.update()
ShareProperties.values()
ShareProperties.access_tier
ShareProperties.deleted
ShareProperties.deleted_time
ShareProperties.enable_snapshot_virtual_directory_access
ShareProperties.etag
ShareProperties.last_modified
ShareProperties.lease
ShareProperties.metadata
ShareProperties.name
ShareProperties.next_allowed_quota_downgrade_time
ShareProperties.next_provisioned_bandwidth_downgrade
ShareProperties.next_provisioned_iops_downgrade
ShareProperties.paid_bursting_bandwidth_mibps
ShareProperties.paid_bursting_enabled
ShareProperties.paid_bursting_iops
ShareProperties.protocols
ShareProperties.provisioned_bandwidth
ShareProperties.provisioned_egress_mbps
ShareProperties.provisioned_ingress_mbps
ShareProperties.provisioned_iops
ShareProperties.quota
ShareProperties.remaining_retention_days
ShareProperties.root_squash
ShareProperties.snapshot
ShareProperties.version
ShareProtocolSettings
ShareProtocols
ShareProtocols.maketrans()
ShareProtocols.capitalize()
ShareProtocols.casefold()
ShareProtocols.center()
ShareProtocols.count()
ShareProtocols.encode()
ShareProtocols.endswith()
ShareProtocols.expandtabs()
ShareProtocols.find()
ShareProtocols.format()
ShareProtocols.format_map()
ShareProtocols.index()
ShareProtocols.isalnum()
ShareProtocols.isalpha()
ShareProtocols.isascii()
ShareProtocols.isdecimal()
ShareProtocols.isdigit()
ShareProtocols.isidentifier()
ShareProtocols.islower()
ShareProtocols.isnumeric()
ShareProtocols.isprintable()
ShareProtocols.isspace()
ShareProtocols.istitle()
ShareProtocols.isupper()
ShareProtocols.join()
ShareProtocols.ljust()
ShareProtocols.lower()
ShareProtocols.lstrip()
ShareProtocols.partition()
ShareProtocols.removeprefix()
ShareProtocols.removesuffix()
ShareProtocols.replace()
ShareProtocols.rfind()
ShareProtocols.rindex()
ShareProtocols.rjust()
ShareProtocols.rpartition()
ShareProtocols.rsplit()
ShareProtocols.rstrip()
ShareProtocols.split()
ShareProtocols.splitlines()
ShareProtocols.startswith()
ShareProtocols.strip()
ShareProtocols.swapcase()
ShareProtocols.title()
ShareProtocols.translate()
ShareProtocols.upper()
ShareProtocols.zfill()
ShareProtocols.NFS
ShareProtocols.SMB
ShareRootSquash
ShareRootSquash.maketrans()
ShareRootSquash.capitalize()
ShareRootSquash.casefold()
ShareRootSquash.center()
ShareRootSquash.count()
ShareRootSquash.encode()
ShareRootSquash.endswith()
ShareRootSquash.expandtabs()
ShareRootSquash.find()
ShareRootSquash.format()
ShareRootSquash.format_map()
ShareRootSquash.index()
ShareRootSquash.isalnum()
ShareRootSquash.isalpha()
ShareRootSquash.isascii()
ShareRootSquash.isdecimal()
ShareRootSquash.isdigit()
ShareRootSquash.isidentifier()
ShareRootSquash.islower()
ShareRootSquash.isnumeric()
ShareRootSquash.isprintable()
ShareRootSquash.isspace()
ShareRootSquash.istitle()
ShareRootSquash.isupper()
ShareRootSquash.join()
ShareRootSquash.ljust()
ShareRootSquash.lower()
ShareRootSquash.lstrip()
ShareRootSquash.partition()
ShareRootSquash.removeprefix()
ShareRootSquash.removesuffix()
ShareRootSquash.replace()
ShareRootSquash.rfind()
ShareRootSquash.rindex()
ShareRootSquash.rjust()
ShareRootSquash.rpartition()
ShareRootSquash.rsplit()
ShareRootSquash.rstrip()
ShareRootSquash.split()
ShareRootSquash.splitlines()
ShareRootSquash.startswith()
ShareRootSquash.strip()
ShareRootSquash.swapcase()
ShareRootSquash.title()
ShareRootSquash.translate()
ShareRootSquash.upper()
ShareRootSquash.zfill()
ShareRootSquash.ALL_SQUASH
ShareRootSquash.NO_ROOT_SQUASH
ShareRootSquash.ROOT_SQUASH
ShareSasPermissions
ShareServiceClient
ShareServiceClient.from_connection_string()
ShareServiceClient.close()
ShareServiceClient.create_share()
ShareServiceClient.delete_share()
ShareServiceClient.get_service_properties()
ShareServiceClient.get_share_client()
ShareServiceClient.list_shares()
ShareServiceClient.set_service_properties()
ShareServiceClient.undelete_share()
ShareServiceClient.api_version
ShareServiceClient.location_mode
ShareServiceClient.primary_endpoint
ShareServiceClient.primary_hostname
ShareServiceClient.secondary_endpoint
ShareServiceClient.secondary_hostname
ShareServiceClient.url
ShareSmbSettings
SmbMultichannel
StorageErrorCode
StorageErrorCode.maketrans()
StorageErrorCode.capitalize()
StorageErrorCode.casefold()
StorageErrorCode.center()
StorageErrorCode.count()
StorageErrorCode.encode()
StorageErrorCode.endswith()
StorageErrorCode.expandtabs()
StorageErrorCode.find()
StorageErrorCode.format()
StorageErrorCode.format_map()
StorageErrorCode.index()
StorageErrorCode.isalnum()
StorageErrorCode.isalpha()
StorageErrorCode.isascii()
StorageErrorCode.isdecimal()
StorageErrorCode.isdigit()
StorageErrorCode.isidentifier()
StorageErrorCode.islower()
StorageErrorCode.isnumeric()
StorageErrorCode.isprintable()
StorageErrorCode.isspace()
StorageErrorCode.istitle()
StorageErrorCode.isupper()
StorageErrorCode.join()
StorageErrorCode.ljust()
StorageErrorCode.lower()
StorageErrorCode.lstrip()
StorageErrorCode.partition()
StorageErrorCode.removeprefix()
StorageErrorCode.removesuffix()
StorageErrorCode.replace()
StorageErrorCode.rfind()
StorageErrorCode.rindex()
StorageErrorCode.rjust()
StorageErrorCode.rpartition()
StorageErrorCode.rsplit()
StorageErrorCode.rstrip()
StorageErrorCode.split()
StorageErrorCode.splitlines()
StorageErrorCode.startswith()
StorageErrorCode.strip()
StorageErrorCode.swapcase()
StorageErrorCode.title()
StorageErrorCode.translate()
StorageErrorCode.upper()
StorageErrorCode.zfill()
StorageErrorCode.ACCOUNT_ALREADY_EXISTS
StorageErrorCode.ACCOUNT_BEING_CREATED
StorageErrorCode.ACCOUNT_IS_DISABLED
StorageErrorCode.APPEND_POSITION_CONDITION_NOT_MET
StorageErrorCode.AUTHENTICATION_FAILED
StorageErrorCode.AUTHORIZATION_FAILURE
StorageErrorCode.BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE
StorageErrorCode.BLOB_ALREADY_EXISTS
StorageErrorCode.BLOB_ARCHIVED
StorageErrorCode.BLOB_BEING_REHYDRATED
StorageErrorCode.BLOB_NOT_ARCHIVED
StorageErrorCode.BLOB_NOT_FOUND
StorageErrorCode.BLOB_OVERWRITTEN
StorageErrorCode.BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH
StorageErrorCode.BLOCK_COUNT_EXCEEDS_LIMIT
StorageErrorCode.BLOCK_LIST_TOO_LONG
StorageErrorCode.CANNOT_CHANGE_TO_LOWER_TIER
StorageErrorCode.CANNOT_DELETE_FILE_OR_DIRECTORY
StorageErrorCode.CANNOT_VERIFY_COPY_SOURCE
StorageErrorCode.CLIENT_CACHE_FLUSH_DELAY
StorageErrorCode.CONDITION_HEADERS_NOT_SUPPORTED
StorageErrorCode.CONDITION_NOT_MET
StorageErrorCode.CONTAINER_ALREADY_EXISTS
StorageErrorCode.CONTAINER_BEING_DELETED
StorageErrorCode.CONTAINER_DISABLED
StorageErrorCode.CONTAINER_NOT_FOUND
StorageErrorCode.CONTAINER_QUOTA_DOWNGRADE_NOT_ALLOWED
StorageErrorCode.CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT
StorageErrorCode.CONTENT_LENGTH_MUST_BE_ZERO
StorageErrorCode.COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED
StorageErrorCode.COPY_ID_MISMATCH
StorageErrorCode.DELETE_PENDING
StorageErrorCode.DESTINATION_PATH_IS_BEING_DELETED
StorageErrorCode.DIRECTORY_NOT_EMPTY
StorageErrorCode.EMPTY_METADATA_KEY
StorageErrorCode.FEATURE_VERSION_MISMATCH
StorageErrorCode.FILE_LOCK_CONFLICT
StorageErrorCode.FILE_SHARE_PROVISIONED_BANDWIDTH_DOWNGRADE_NOT_ALLOWED
StorageErrorCode.FILE_SHARE_PROVISIONED_IOPS_DOWNGRADE_NOT_ALLOWED
StorageErrorCode.FILE_SYSTEM_ALREADY_EXISTS
StorageErrorCode.FILE_SYSTEM_BEING_DELETED
StorageErrorCode.FILE_SYSTEM_NOT_FOUND
StorageErrorCode.INCREMENTAL_COPY_BLOB_MISMATCH
StorageErrorCode.INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED
StorageErrorCode.INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED
StorageErrorCode.INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT
StorageErrorCode.INFINITE_LEASE_DURATION_REQUIRED
StorageErrorCode.INSUFFICIENT_ACCOUNT_PERMISSIONS
StorageErrorCode.INTERNAL_ERROR
StorageErrorCode.INVALID_AUTHENTICATION_INFO
StorageErrorCode.INVALID_BLOB_OR_BLOCK
StorageErrorCode.INVALID_BLOB_TIER
StorageErrorCode.INVALID_BLOB_TYPE
StorageErrorCode.INVALID_BLOCK_ID
StorageErrorCode.INVALID_BLOCK_LIST
StorageErrorCode.INVALID_DESTINATION_PATH
StorageErrorCode.INVALID_FILE_OR_DIRECTORY_PATH_NAME
StorageErrorCode.INVALID_FLUSH_POSITION
StorageErrorCode.INVALID_HEADER_VALUE
StorageErrorCode.INVALID_HTTP_VERB
StorageErrorCode.INVALID_INPUT
StorageErrorCode.INVALID_MARKER
StorageErrorCode.INVALID_MD5
StorageErrorCode.INVALID_METADATA
StorageErrorCode.INVALID_OPERATION
StorageErrorCode.INVALID_PAGE_RANGE
StorageErrorCode.INVALID_PROPERTY_NAME
StorageErrorCode.INVALID_QUERY_PARAMETER_VALUE
StorageErrorCode.INVALID_RANGE
StorageErrorCode.INVALID_RENAME_SOURCE_PATH
StorageErrorCode.INVALID_RESOURCE_NAME
StorageErrorCode.INVALID_SOURCE_BLOB_TYPE
StorageErrorCode.INVALID_SOURCE_BLOB_URL
StorageErrorCode.INVALID_SOURCE_OR_DESTINATION_RESOURCE_TYPE
StorageErrorCode.INVALID_SOURCE_URI
StorageErrorCode.INVALID_URI
StorageErrorCode.INVALID_VERSION_FOR_PAGE_BLOB_OPERATION
StorageErrorCode.INVALID_XML_DOCUMENT
StorageErrorCode.INVALID_XML_NODE_VALUE
StorageErrorCode.LEASE_ALREADY_BROKEN
StorageErrorCode.LEASE_ALREADY_PRESENT
StorageErrorCode.LEASE_ID_MISMATCH_WITH_BLOB_OPERATION
StorageErrorCode.LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION
StorageErrorCode.LEASE_ID_MISMATCH_WITH_LEASE_OPERATION
StorageErrorCode.LEASE_ID_MISSING
StorageErrorCode.LEASE_IS_ALREADY_BROKEN
StorageErrorCode.LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED
StorageErrorCode.LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED
StorageErrorCode.LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED
StorageErrorCode.LEASE_LOST
StorageErrorCode.LEASE_NAME_MISMATCH
StorageErrorCode.LEASE_NOT_PRESENT_WITH_BLOB_OPERATION
StorageErrorCode.LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION
StorageErrorCode.LEASE_NOT_PRESENT_WITH_LEASE_OPERATION
StorageErrorCode.MAX_BLOB_SIZE_CONDITION_NOT_MET
StorageErrorCode.MD5_MISMATCH
StorageErrorCode.MESSAGE_NOT_FOUND
StorageErrorCode.MESSAGE_TOO_LARGE
StorageErrorCode.METADATA_TOO_LARGE
StorageErrorCode.MISSING_CONTENT_LENGTH_HEADER
StorageErrorCode.MISSING_REQUIRED_HEADER
StorageErrorCode.MISSING_REQUIRED_QUERY_PARAMETER
StorageErrorCode.MISSING_REQUIRED_XML_NODE
StorageErrorCode.MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED
StorageErrorCode.NO_AUTHENTICATION_INFORMATION
StorageErrorCode.NO_PENDING_COPY_OPERATION
StorageErrorCode.OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB
StorageErrorCode.OPERATION_TIMED_OUT
StorageErrorCode.OUT_OF_RANGE_INPUT
StorageErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE
StorageErrorCode.PARENT_NOT_FOUND
StorageErrorCode.PATH_ALREADY_EXISTS
StorageErrorCode.PATH_CONFLICT
StorageErrorCode.PATH_NOT_FOUND
StorageErrorCode.PENDING_COPY_OPERATION
StorageErrorCode.POP_RECEIPT_MISMATCH
StorageErrorCode.PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER
StorageErrorCode.PREVIOUS_SNAPSHOT_NOT_FOUND
StorageErrorCode.PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED
StorageErrorCode.QUEUE_ALREADY_EXISTS
StorageErrorCode.QUEUE_BEING_DELETED
StorageErrorCode.QUEUE_DISABLED
StorageErrorCode.QUEUE_NOT_EMPTY
StorageErrorCode.QUEUE_NOT_FOUND
StorageErrorCode.READ_ONLY_ATTRIBUTE
StorageErrorCode.RENAME_DESTINATION_PARENT_PATH_NOT_FOUND
StorageErrorCode.REQUEST_BODY_TOO_LARGE
StorageErrorCode.REQUEST_URL_FAILED_TO_PARSE
StorageErrorCode.RESOURCE_ALREADY_EXISTS
StorageErrorCode.RESOURCE_NOT_FOUND
StorageErrorCode.RESOURCE_TYPE_MISMATCH
StorageErrorCode.SEQUENCE_NUMBER_CONDITION_NOT_MET
StorageErrorCode.SEQUENCE_NUMBER_INCREMENT_TOO_LARGE
StorageErrorCode.SERVER_BUSY
StorageErrorCode.SHARE_ALREADY_EXISTS
StorageErrorCode.SHARE_BEING_DELETED
StorageErrorCode.SHARE_DISABLED
StorageErrorCode.SHARE_HAS_SNAPSHOTS
StorageErrorCode.SHARE_NOT_FOUND
StorageErrorCode.SHARE_SNAPSHOT_COUNT_EXCEEDED
StorageErrorCode.SHARE_SNAPSHOT_IN_PROGRESS
StorageErrorCode.SHARE_SNAPSHOT_OPERATION_NOT_SUPPORTED
StorageErrorCode.SHARING_VIOLATION
StorageErrorCode.SNAPHOT_OPERATION_RATE_EXCEEDED
StorageErrorCode.SNAPSHOTS_PRESENT
StorageErrorCode.SNAPSHOT_COUNT_EXCEEDED
StorageErrorCode.SNAPSHOT_OPERATION_RATE_EXCEEDED
StorageErrorCode.SOURCE_CONDITION_NOT_MET
StorageErrorCode.SOURCE_PATH_IS_BEING_DELETED
StorageErrorCode.SOURCE_PATH_NOT_FOUND
StorageErrorCode.SYSTEM_IN_USE
StorageErrorCode.TARGET_CONDITION_NOT_MET
StorageErrorCode.UNAUTHORIZED_BLOB_OVERWRITE
StorageErrorCode.UNSUPPORTED_HEADER
StorageErrorCode.UNSUPPORTED_HTTP_VERB
StorageErrorCode.UNSUPPORTED_QUERY_PARAMETER
StorageErrorCode.UNSUPPORTED_REST_VERSION
StorageErrorCode.UNSUPPORTED_XML_NODE
generate_account_sas()
generate_file_sas()
generate_share_sas()
- Subpackages
- azure.storage.fileshare.aio package
ShareClient
ShareClient.from_connection_string()
ShareClient.from_share_url()
ShareClient.acquire_lease()
ShareClient.close()
ShareClient.create_directory()
ShareClient.create_permission_for_share()
ShareClient.create_share()
ShareClient.create_snapshot()
ShareClient.delete_directory()
ShareClient.delete_share()
ShareClient.get_directory_client()
ShareClient.get_file_client()
ShareClient.get_permission_for_share()
ShareClient.get_share_access_policy()
ShareClient.get_share_properties()
ShareClient.get_share_stats()
ShareClient.list_directories_and_files()
ShareClient.set_share_access_policy()
ShareClient.set_share_metadata()
ShareClient.set_share_properties()
ShareClient.set_share_quota()
ShareClient.api_version
ShareClient.location_mode
ShareClient.primary_endpoint
ShareClient.primary_hostname
ShareClient.secondary_endpoint
ShareClient.secondary_hostname
ShareClient.url
ShareDirectoryClient
ShareDirectoryClient.from_connection_string()
ShareDirectoryClient.from_directory_url()
ShareDirectoryClient.close()
ShareDirectoryClient.close_all_handles()
ShareDirectoryClient.close_handle()
ShareDirectoryClient.create_directory()
ShareDirectoryClient.create_subdirectory()
ShareDirectoryClient.delete_directory()
ShareDirectoryClient.delete_file()
ShareDirectoryClient.delete_subdirectory()
ShareDirectoryClient.exists()
ShareDirectoryClient.get_directory_properties()
ShareDirectoryClient.get_file_client()
ShareDirectoryClient.get_subdirectory_client()
ShareDirectoryClient.list_directories_and_files()
ShareDirectoryClient.list_handles()
ShareDirectoryClient.rename_directory()
ShareDirectoryClient.set_directory_metadata()
ShareDirectoryClient.set_http_headers()
ShareDirectoryClient.upload_file()
ShareDirectoryClient.api_version
ShareDirectoryClient.location_mode
ShareDirectoryClient.primary_endpoint
ShareDirectoryClient.primary_hostname
ShareDirectoryClient.secondary_endpoint
ShareDirectoryClient.secondary_hostname
ShareDirectoryClient.url
ShareFileClient
ShareFileClient.from_connection_string()
ShareFileClient.from_file_url()
ShareFileClient.abort_copy()
ShareFileClient.acquire_lease()
ShareFileClient.clear_range()
ShareFileClient.close()
ShareFileClient.close_all_handles()
ShareFileClient.close_handle()
ShareFileClient.create_file()
ShareFileClient.create_hardlink()
ShareFileClient.create_symlink()
ShareFileClient.delete_file()
ShareFileClient.download_file()
ShareFileClient.exists()
ShareFileClient.get_file_properties()
ShareFileClient.get_ranges()
ShareFileClient.get_ranges_diff()
ShareFileClient.get_symlink()
ShareFileClient.list_handles()
ShareFileClient.rename_file()
ShareFileClient.resize_file()
ShareFileClient.set_file_metadata()
ShareFileClient.set_http_headers()
ShareFileClient.start_copy_from_url()
ShareFileClient.upload_file()
ShareFileClient.upload_range()
ShareFileClient.upload_range_from_url()
ShareFileClient.api_version
ShareFileClient.location_mode
ShareFileClient.primary_endpoint
ShareFileClient.primary_hostname
ShareFileClient.secondary_endpoint
ShareFileClient.secondary_hostname
ShareFileClient.url
ShareLeaseClient
ShareServiceClient
ShareServiceClient.from_connection_string()
ShareServiceClient.close()
ShareServiceClient.create_share()
ShareServiceClient.delete_share()
ShareServiceClient.get_service_properties()
ShareServiceClient.get_share_client()
ShareServiceClient.list_shares()
ShareServiceClient.set_service_properties()
ShareServiceClient.undelete_share()
ShareServiceClient.api_version
ShareServiceClient.location_mode
ShareServiceClient.primary_endpoint
ShareServiceClient.primary_hostname
ShareServiceClient.secondary_endpoint
ShareServiceClient.secondary_hostname
ShareServiceClient.url
- azure.storage.fileshare.aio package