This post has been republished via RSS; it originally appeared at: Azure Compute Blog articles.
Azure Functions triggers and bindings enable you to easily integrate event and data sources with function applications. With SDK type bindings, you can use types from service SDKs and frameworks, providing more capability beyond what is currently offered. SDK type bindings for Azure Storage Blob when using Python in Azure Functions is now in Preview.
SDK type bindings for Azure Storage Blob enable the following key scenarios:
- Downloading and uploading blobs of large sizes, reducing current memory limitations and GRPC limits.
- Improved performance by using blobs with Azure Functions
To get started using SDK type bindings for Azure Storage Blob, the following prerequisites are required:
- Azure Functions runtime version 4.34.1, or a later version.
- Python version 3.9, or a later supported version.
- Python v2 programming model
Note that currently, only synchronous SDK types are supported.
Then, enable the feature in your Azure Function app:
- Add the
azurefunctions-extensions-bindings-blob
extension package to therequirements.txt
file in the project. - Add this code to the
function_app.py
file in the project, which imports the SDK type bindings:import azurefunctions.extensions.bindings.blob as blob
This example shows how to get the BlobClient
from both a Blob storage trigger (blob_trigger
) and from the input binding on an HTTP trigger (blob_input
).
You can view other SDK type bindings samples for Blob storage in the Python extensions repository: