page_type | languages | products | urlFragment | |||||
---|---|---|---|---|---|---|---|---|
sample |
|
| extension-blob-samples |
These are code samples that show common scenario operations with the Azure Functions Extension Blob library.
These samples relate to the Azure Storage Blob client library being used as part of a Python Function App. For examples on how to use the Azure Storage Blob client library, please see Azure Storage Blob samples
blob_samples_blobclient - Examples for using the BlobClient type:
- From BlobTrigger
- From BlobInput
blob_samples_containerclient - Examples for using the ContainerClient type:
- From BlobTrigger
- From BlobInput
blob_samples_storagestreamdownloader - Examples for using the StorageStreamDownloader type:
- From BlobTrigger
- From BlobInput
- Python 3.9 or later is required to use this package. For more details, please read our page on Python Functions version support policy.
- You must have an Azure subscription and an Azure storage account to use this package.
- Install Core Tools
- Install the Azure Functions Extension Blob library for Python with pip:
pip install azurefunctions-extensions-bindings-blob
- Clone or download this sample repository
- Open the sample folder in Visual Studio Code or your IDE of choice.
- Open a terminal window and
cd
to the directory that the sample you wish to run is saved in. - Set the environment variables specified in the sample file you wish to run.
- Install the required dependencies
pip install -r requirements.txt
- Start the Functions runtime
func start
- Execute the function by either sending an HTTP request to the local endpoint or uploading a blob to the specified directory, based on the type of function you wish to execute.
Visit the SDK-type bindings in Python reference documentation to learn more about how to use SDK-type bindings in a Python Function App and the API reference documentation to learn more about what you can do with the Azure Storage Blob client library.