Class - AzureBlobDataSource#
- class openfl.federated.data.sources.azure_blob_data_source.AzureBlobDataSource(name, connection_string, container_name, folder_prefix='', hash_func=<built-in function openssl_sha384>)[source]#
Bases:
DataSourceClass for Azure Blob data
- Parameters:
name (str)
connection_string (str)
container_name (str)
hash_func (Callable[[...], hashlib._Hash])
- __init__(name, connection_string, container_name, folder_prefix='', hash_func=<built-in function openssl_sha384>)[source]#
Initialize a DataSource.
- Parameters:
type (DataSourceType) – The storage type of the data source.
name (str) – The name of the data source.
connection_string (str)
container_name (str)
hash_func (Callable[[...], hashlib._Hash])
Methods
__init__(name, connection_string, container_name)Initialize a DataSource.
compute_file_hash(blob_path)Compute the hash of a blob's binary content.
List all blobs in the container (full recursive listing)
from_dict(ds_dict)Create a DataSource from a dictionary.
is_valid_hash_function(func)read_blob(blob_path)Read blob content as binary data.
to_dict()Convert the object to a dictionary using the serialization rules.
- compute_file_hash(blob_path)[source]#
Compute the hash of a blob’s binary content.
- Parameters:
blob_path (str)