- class AzuriteContainer(image: str = 'mcr.microsoft.com/azure-storage/azurite:latest', ports_to_expose: Iterable[int] | None = None, **kwargs)ΒΆ
The example below spins up an Azurite container and shows an example to create a Blob service client with the container. The method
get_connection_string
can be used to create a client for Blob service, Queue service and Table service.Example
>>> from testcontainers.azurite import AzuriteContainer >>> from azure.storage.blob import BlobServiceClient >>> with AzuriteContainer() as azurite_container: ... connection_string = azurite_container.get_connection_string() ... client = BlobServiceClient.from_connection_string( ... connection_string, ... api_version="2019-12-12" ... )