aio package
Classes
| BlobServiceClient |
A client to interact with the Blob Service at the account level. This client provides operations to retrieve and configure the account properties as well as list, create and delete containers within the account. For operations relating to a specific container or blob, clients for those entities can also be retrieved using the get_client functions. |
| ContainerClient |
A client to interact with a specific container, although that container may not yet exist. For operations relating to a specific blob within this container, a blob client can be retrieved using the get_blob_client(blob, snapshot=None) function. |
| BlobClient |
A client to interact with a specific blob, although that blob may not yet exist. |
| BlobLeaseClient |
Creates a new BlobLeaseClient. This client provides lease operations on a BlobClient or ContainerClient. |
| ExponentialRetry |
Exponential retry. |
| LinearRetry |
Linear retry. |
| StorageStreamDownloader |
A streaming object to download from Azure Storage. |
Functions
upload_blob_to_url(blob_url, data, credential=None, **kwargs)
Upload data to a given URL
The data will be uploaded as a block blob.
upload_blob_to_url(blob_url, data, credential=None, **kwargs)
Parameters
- blob_url
- str
The full URI to the blob. This can also include a SAS token.
- data
- bytes or str or Iterable
The data to upload. This can be bytes, text, an iterable or a file-like object.
- credential
The credentials with which to authenticate. This is optional if the blob URL already has a SAS token. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. If the URL already has a SAS token, specifying an explicit credential will take priority.
Returns
Blob-updated property dict (Etag and last modified)
Return type
download_blob_from_url(blob_url, output, credential=None, **kwargs)
Download the contents of a blob to a local file or stream.
download_blob_from_url(blob_url, output, credential=None, **kwargs)
Parameters
- blob_url
- str
The full URI to the blob. This can also include a SAS token.
- output
- str or writable stream
Where the data should be downloaded to. This could be either a file path to write to, or an open IO handle to write to.
- credential
The credentials with which to authenticate. This is optional if the blob URL already has a SAS token or the blob is public. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. If the URL already has a SAS token, specifying an explicit credential will take priority.