Skip to content

Commit c6af254

Browse files
hallvictoriaVictoria Hall
andauthored
build: update azurefunctions-extensions-blob to 1.0.0b1 (#37)
* update __init__.py * blob samples * pypi link in readme * readme title * removed conda link --------- Co-authored-by: Victoria Hall <victoria.hall@microsoft.com>
1 parent e5c6d34 commit c6af254

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

azurefunctions-extensions-bindings-blob/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Azure Functions Extension Blob library for Python
1+
# Azure Functions Extensions Bindings Blob library for Python
22
This library allows Blob Trigger and Blob Input bindings in Python Function Apps to recognize and bind to client types from the
33
Azure 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
3029
pip 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
5049
Blob Input and define the type as a BlobClient, ContainerClient, or StorageStreamDownloader. Instead of receiving
5150
an InputStream, when the function is executed, the type returned will be the defined SDK-type and have all of the
5251
properties and methods available as seen in the Azure Storage Blob library for Python.
@@ -63,7 +62,7 @@ import azurefunctions.extensions.bindings.blob as blob
6362
def 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):
7372
def 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

azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"BlobClientConverter",
1414
]
1515

16-
__version__ = "1.0.0a1"
16+
__version__ = "1.0.0b1"

azurefunctions-extensions-bindings-blob/samples/blob_samples_blobclient/function_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def blob_trigger(client: blob.BlobClient):
3535
logging.info(
3636
f"Python blob trigger function processed blob \n"
3737
f"Properties: {client.get_blob_properties()}\n"
38-
f"Blob content: {client.download_blob().readall()}"
38+
f"Blob content head: {client.download_blob().read(size=1)}"
3939
)
4040

4141

@@ -45,8 +45,8 @@ def blob_trigger(client: blob.BlobClient):
4545
)
4646
def blob_input(req: func.HttpRequest, client: blob.BlobClient):
4747
logging.info(
48-
f"Python blob trigger function processed blob \n"
48+
f"Python blob input function processed blob \n"
4949
f"Properties: {client.get_blob_properties()}\n"
50-
f"Blob content: {client.download_blob().readall()}"
50+
f"Blob content head: {client.download_blob().read(size=1)}"
5151
)
5252
return "ok"

azurefunctions-extensions-bindings-blob/samples/blob_samples_containerclient/function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def blob_trigger(client: blob.ContainerClient):
4040
@app.blob_input(arg_name="client", path="CONTAINER", connection="AzureWebJobsStorage")
4141
def blob_input(req: func.HttpRequest, client: blob.BlobClient):
4242
logging.info(
43-
f"Python blob trigger function processed blob \n"
43+
f"Python blob input function processed blob \n"
4444
f"Properties: {client.get_container_properties()}\n"
4545
)
4646
return "ok"

azurefunctions-extensions-bindings-blob/samples/blob_samples_storagestreamdownloader/function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def blob_trigger(stream: blob.StorageStreamDownloader):
4646
def blob_input(req: func.HttpRequest, stream: blob.StorageStreamDownloader):
4747
for chunk in stream.chunks():
4848
logging.info(
49-
f"Python blob trigger function processed blob chunk \n"
49+
f"Python blob input function processed blob chunk \n"
5050
f"Chunk: {chunk.decode()}"
5151
)
5252
return "ok"

0 commit comments

Comments
 (0)