Registry / azure / simple-azure-blob-downloader

simple-azure-blob-downloader

JSON →
library0.1.0pypypi✓ verified 83d ago

simple-azure-blob-downloader is a Python library designed to simplify the process of downloading blobs from Azure Blob Storage. It provides a straightforward interface, acting as a wrapper around the official Azure Storage Blob client library. As of version 0.1.0, it offers basic download functionality.

pip install simple-azure-blob-downloader
INSTALL
IMPORT
SIG · SIMPLE-AZURE-BLOB-
S
simple-azure-blob-downloader
azurepythonv0.1.0
Install
3.9s avg
Import
Disk
47MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 47.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.9s · import 0.000s · 48MB
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

download_blob
import simple_azure_blob_downloader
from simple_azure_blob_downloader import download_blob

This quickstart demonstrates how to download a single blob from Azure Blob Storage using the `download_blob` function. Ensure your Azure Storage connection string, container name, and blob name are configured, preferably via environment variables for security.

import os from simple_azure_blob_downloader import download_blob # Set environment variables for secure access # AZURE_STORAGE_CONNECTION_STRING should be your storage account's connection string # e.g., 'DefaultEndpointsProtocol=https;AccountName=youraccount;AccountKey=yourkey;EndpointSuffix=core.windows.net' connection_string = os.environ.get('AZURE_STORAGE_CONNECTION_STRING', 'YOUR_AZURE_STORAGE_CONNECTION_STRING') container_name = os.environ.get('AZURE_BLOB_CONTAINER_NAME', 'my-container') blob_name = os.environ.get('AZURE_BLOB_NAME', 'my-file.txt') local_destination_path = os.environ.get('LOCAL_DOWNLOAD_PATH', 'downloaded_file.txt') if connection_string == 'YOUR_AZURE_STORAGE_CONNECTION_STRING': print("Please set the AZURE_STORAGE_CONNECTION_STRING environment variable or replace the placeholder.") else: try: # Download a single blob download_blob(connection_string, container_name, blob_name, local_destination_path) print(f"Successfully downloaded '{blob_name}' to '{local_destination_path}'.") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
gotchaThe library is a wrapper around `azure-storage-blob`. For advanced features or debugging, understanding the underlying Azure SDK documentation is beneficial, as this library provides a simplified interface for common download operations.
fix
Consult the official `azure-storage-blob` documentation for detailed behavior and capabilities of the underlying Azure SDK.
affects: 0.1.0
gotchaDirect error handling from `simple-azure-blob-downloader` might be limited. Errors originating from the underlying `azure-storage-blob` library will be propagated, requiring familiarity with its exception types (e.g., `ResourceNotFoundError` for missing blobs or containers) for robust error management.
fix
Wrap calls to `download_blob` in try-except blocks, specifically catching exceptions from `azure.core.exceptions` or `azure.storage.blob` if detailed error handling is required.
affects: 0.1.0
Upgrade
Version history
0.1.0latest on PyPI · released Jul 25, 2022
Audit
Dependencies
azure-storage-blobrequiredCore functionality for interacting with Azure Blob Storage.
Agent activity
45 hits · last 30 days
node
40
OpenAI (training)
1
Resources
simple-azure-blob-downloader — pip install simple-azure-blob-downloader · libregistry