AzureBlobStorageManager
A client for interacting with Azure Blob Storage.
Inherits from:
BaseObjectStorageManager
: to provide a generic interface for object storage clients
Parameters:
connection_string
(str): A connection string or SAS URL to an Azure Blob Storage account.
__init__
Initialize an instance of AzureBlobStorageManager
.
Parameters
connection_string
(str): A connection string or SAS URL to an Azure Blob Storage account.
create_container
Creates a new container with the specified name.
Parameters
container_name
(str): The name of the container to create.
Returns
Dict[str, Any]
: A dictionary containing the response information.
Tip
You can check here an example
is_container_exists
Checks if container with container_name
exists in the Storage.
Parameters
container_name
(str): The name of the container to create.
Returns
bool
: True when the container exists and False in case it doesn't
Tip
You can check here an example
delete_container
Deletes a container with the specified name.
Parameters
container_name
(str): The name of the container to create.
Returns
Dict[str, Any]
: A dictionary containing the response information.
Tip
You can check here an example
list_objects
Lists blobs in the specified container.
Parameters
container_name
(str): The name of the container.
Returns
List[BlobProperties]
: A list ofBlobProperties
objects representing the blobs in the container.
Tip
You can check here an example
get_blob_sas
Generates a URL for a blob with a SAS token that allows read and write access.
Parameters
container
(str): The name of the container.key
(str): The name of the blob.read
(bool, optional): Flag indicating whether read access is allowed. Defaults toFalse
.write
(bool, optional): Flag indicating whether write access is allowed. Defaults toFalse
.delete
(bool, optional): Flag indicating whether delete access is allowed. Defaults toFalse
.move
(bool, optional): Flag indicating whether move access is allowed. Defaults toFalse
.
Returns
str
: The URL of the blob with a SAS token for the specified access permissions.
Tip
You can check here an example
get_container_sas
Generates a URL for the storage account with a SAS token that allows read, write, list, and delete access to containers and blobs.
Parameters
container
(str): The name of the container.read
(bool, optional): Flag indicating whether read access is allowed. Defaults toFalse
.write
(bool, optional): Flag indicating whether write access is allowed. Defaults toFalse
.list
(bool, optional): Flag indicating whether list access is allowed. Defaults toFalse
.delete
(bool, optional): Flag indicating whether delete access is allowed. Defaults toFalse
.
Returns
str
: The URL of the storage account with a SAS token for the specified access permissions.
Tip
You can check here an example