astronomer.providers.microsoft.azure.hooks.wasb

This module contains the Azure WASB hook’s asynchronous implementation.

Module Contents

Classes

WasbHookAsync

An async hook that connects to Azure WASB to perform operations.

Attributes

Credentials

astronomer.providers.microsoft.azure.hooks.wasb.Credentials
class astronomer.providers.microsoft.azure.hooks.wasb.WasbHookAsync(wasb_conn_id='wasb_default', public_read=False)[source]

Bases: airflow.providers.microsoft.azure.hooks.wasb.WasbHook

An async hook that connects to Azure WASB to perform operations.

Parameters:
  • wasb_conn_id (str) – reference to the wasb connection

  • public_read (bool) – whether an anonymous public read access should be used. default is False

get_conn()[source]

Return the async BlobServiceClient object.

async check_for_blob_async(container_name, blob_name, **kwargs)[source]

Check if a blob exists on Azure Blob Storage.

Parameters:
  • container_name (str) – name of the container

  • blob_name (str) – name of the blob

  • kwargs (Any) – optional keyword arguments for BlobClient.get_blob_properties

async get_blobs_list_async(container_name, prefix=None, include=None, delimiter='/', **kwargs)[source]

List blobs in a given container.

Parameters:
  • container_name (str) – the name of the container

  • prefix (Optional[str]) – filters the results to return only blobs whose names begin with the specified prefix.

  • include (Optional[List[str]]) – specifies one or more additional datasets to include in the response. Options include: snapshots, metadata, uncommittedblobs, copy`, ``deleted.

  • delimiter (str) – filters objects based on the delimiter (for e.g ‘.csv’)

async check_for_prefix_async(container_name, prefix, **kwargs)[source]

Check if a prefix exists on Azure Blob storage.

Parameters:
  • container_name (str) – Name of the container.

  • prefix (str) – Prefix of the blob.

  • kwargs (Any) – Optional keyword arguments for ContainerClient.walk_blobs