1- # Azure Functions Extension Blob library for Python
1+ # Azure Functions Extensions Bindings Blob library for Python
22This library allows Blob Trigger and Blob Input bindings in Python Function Apps to recognize and bind to client types from the
33Azure Storage Blob sdk.
44
@@ -8,8 +8,7 @@ Blob client types can be generated from:
88* Blob Input
99
1010[ Source code] ( https://github.com/Azure/azure-functions-python-extensions/tree/main/azurefunctions-extensions-bindings-blob )
11- | Package (PyPi)
12- | Package (Conda)
11+ [ Package (PyPi)] ( https://pypi.org/project/azurefunctions-extensions-bindings-blob/ )
1312| API reference documentation
1413| Product documentation
1514| [ Samples] ( hhttps://github.com/Azure/azure-functions-python-extensions/tree/main/azurefunctions-extensions-bindings-blob/samples )
@@ -24,7 +23,7 @@ Blob client types can be generated from:
2423[ Azure storage account] ( https://docs.microsoft.com/azure/storage/common/storage-account-overview ) to use this package.
2524
2625### Install the package
27- Install the Azure Functions Extension Blob library for Python with pip:
26+ Install the Azure Functions Extensions Bindings Blob library for Python with pip:
2827
2928``` bash
3029pip install azurefunctions-extensions-bindings-blob
@@ -46,7 +45,7 @@ az storage account create -n my-storage-account-name -g my-resource-group
4645```
4746
4847### Bind to the SDK-type
49- The Azure Functions Extension Blob library for Python allows you to create a function app with a Blob Trigger or
48+ The Azure Functions Extensions Bindings Blob library for Python allows you to create a function app with a Blob Trigger or
5049Blob Input and define the type as a BlobClient, ContainerClient, or StorageStreamDownloader. Instead of receiving
5150an InputStream, when the function is executed, the type returned will be the defined SDK-type and have all of the
5251properties and methods available as seen in the Azure Storage Blob library for Python.
@@ -63,7 +62,7 @@ import azurefunctions.extensions.bindings.blob as blob
6362def blob_trigger (client : blob.BlobClient):
6463 logging.info(f " Python blob trigger function processed blob \n "
6564 f " Properties: { client.get_blob_properties()} \n "
66- f " Blob content: { client.download_blob(encoding = " utf-8" ).readall( )} " )
65+ f " Blob content head : { client.download_blob(encoding = " utf-8" ).read( size = 1 )} " )
6766
6867
6968@app.route (route = " file" )
@@ -73,7 +72,7 @@ def blob_trigger(client: blob.BlobClient):
7372def blob_input (req : func.HttpRequest, client : blob.BlobClient):
7473 logging.info(f " Python blob input function processed blob \n "
7574 f " Properties: { client.get_blob_properties()} \n "
76- f " Blob content: { client.download_blob(encoding = " utf-8" ).readall( )} " )
75+ f " Blob content head : { client.download_blob(encoding = " utf-8" ).read( size = 1 )} " )
7776```
7877
7978## Troubleshooting
0 commit comments