- def connection(self):
- if self._connection is None:
- connect_str = setting("AZURE_STORAGE_CONNECTION_STRING")
- # Create the BlobServiceClient object which will be used to create a container client
- blob_service_client = BlobServiceClient.from_connection_string(connect_str)
- # Create a unique name for the container
- container_name = "pac-files"
- # Create a blob client using the local file name as the name for the blob
- self._connection = blob_service_client
- return self._connection
|