azure
Classes:
-
BlobStorage–Storage for Azure Blob data.
BlobPointer
BlobRouter
BlobStorage
BlobStorage(
*,
service_client: BlobServiceClient,
blob_router: BlobRouter | None,
path_prefix: str = ""
)
Bases: Storage['BlobPointer']
Storage for Azure Blob data.
Methods:
-
deserialize_config–Deserialize the configuration from a JSON string.
-
read_data–Load data from the given location.
-
read_data_stream–Load a data stream from the given location.
-
serialize_config–Serialize the configuration to a JSON string.
-
write_data–Save the given value data.
-
write_data_stream–Save the given data stream.
deserialize_config
deserialize_config(config: str) -> C
Deserialize the configuration from a JSON string.
read_data_stream
async
read_data_stream(
pointer: BlobPointer,
) -> AsyncGenerator[bytes]
Load a data stream from the given location.
write_data
async
write_data(
data: bytes, digest: Digest, tags: TagMap
) -> BlobPointer
Save the given value data.
write_data_stream
async
write_data_stream(
data_stream: AsyncIterable[bytes],
get_digest: GetStreamDigest,
tags: TagMap,
) -> BlobPointer
Save the given data stream.
simple_blob_router
simple_blob_router(
container: str, prefix: str = ""
) -> BlobRouter
Create a simple blob router that returns a BlobPointer based on the container and prefix.
Parameters:
-
(containerstr) –The name of the Azure Blob Storage container.
-
(prefixstr, default:'') –An optional prefix to prepend to the blob path.
Returns:
-
BlobRouter–A BlobRouter that generates BlobPointers for the specified container and prefix.