Skip to content

Commit 7464e80

Browse files
committed
feedback
1 parent fd9b1d8 commit 7464e80

File tree

4 files changed

+7
-53
lines changed

4 files changed

+7
-53
lines changed

articles/azure-functions/functions-bindings-storage-blob-input.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ ms.topic: reference
55
ms.date: 05/12/2024
66
ms.devlang: csharp
77
# ms.devlang: csharp, java, javascript, powershell, python
8-
ms.custom:
9-
- devx-track-csharp
10-
- devx-track-python
11-
- devx-track-extended-java
12-
- devx-track-js
13-
- devx-track-ts
14-
- build-2025
8+
ms.custom: devx-track-csharp, devx-track-python, devx-track-extended-java, devx-track-js, devx-track-ts
159
zone_pivot_groups: programming-languages-set-functions
1610
---
1711

@@ -225,25 +219,7 @@ Write-Host "PowerShell Blob trigger: Name: $($TriggerMetadata.Name) Size: $($Inp
225219

226220
This example uses SDK types to directly access the underlying `BlobClient` object provided by the Blob storage input binding:
227221

228-
```python
229-
import logging
230-
import azure.functions as func
231-
import azurefunctions.extensions.bindings.blob as blob
232-
233-
app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)
234-
235-
@app.route(route="file")
236-
@app.blob_input(
237-
arg_name="client", path="PATH/TO/BLOB", connection="CONNECTION_SETTING"
238-
)
239-
def blob_input(req: func.HttpRequest, client: blob.BlobClient):
240-
logging.info(
241-
f"Python blob input function processed blob \n"
242-
f"Properties: {client.get_blob_properties()}\n"
243-
f"Blob content head: {client.download_blob().read(size=1)}"
244-
)
245-
return "ok"
246-
```
222+
:::code language="python" source="~/functions-python-extensions/azurefunctions-extensions-bindings-blob/samples/blob_samples_blobclient/function_app.py" range="9-12,40-50":::
247223

248224
For examples of using other SDK types, see the [`ContainerClient`](https://github.com/Azure/azure-functions-python-extensions/blob/dev/azurefunctions-extensions-bindings-blob/samples/blob_samples_containerclient/function_app.py) and [`StorageStreamDownloader`](https://github.com/Azure/azure-functions-python-extensions/blob/dev/azurefunctions-extensions-bindings-blob/samples/blob_samples_storagestreamdownloader/function_app.py) samples. For a step-by-step tutorial on how to include SDK-type bindings in your function app, follow the [Python SDK Bindings for Blob Sample](https://github.com/Azure-Samples/azure-functions-blob-sdk-bindings-python).
249225

articles/azure-functions/functions-bindings-storage-blob-trigger.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ ms.topic: reference
55
ms.date: 05/14/2024
66
ms.devlang: csharp
77
# ms.devlang: csharp, java, javascript, powershell, python
8-
ms.custom:
9-
- devx-track-csharp
10-
- devx-track-python
11-
- devx-track-extended-java
12-
- devx-track-js
13-
- devx-track-ts
14-
- build-2025
8+
ms.custom: devx-track-csharp, devx-track-python, devx-track-extended-java, devx-track-js, devx-track-ts
159
zone_pivot_groups: programming-languages-set-functions
1610
---
1711

@@ -182,23 +176,7 @@ Write-Host "PowerShell Blob trigger: Name: $($TriggerMetadata.Name) Size: $($Inp
182176

183177
This example uses SDK types to directly access the underlying [`BlobClient`](/python/api/azure-storage-blob/azure.storage.blob.blobclient) object provided by the Blob storage trigger:
184178

185-
```python
186-
import logging
187-
import azure.functions as func
188-
import azurefunctions.extensions.bindings.blob as blob
189-
190-
app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)
191-
192-
@app.blob_trigger(
193-
arg_name="client", path="PATH/TO/BLOB", connection="CONNECTION_SETTING"
194-
)
195-
def blob_trigger(client: blob.BlobClient):
196-
logging.info(
197-
f"Python blob trigger function processed blob \n"
198-
f"Properties: {client.get_blob_properties()}\n"
199-
f"Blob content head: {client.download_blob().read(size=1)}"
200-
)
201-
```
179+
:::code language="python" source="~/functions-python-extensions/azurefunctions-extensions-bindings-blob/samples/blob_samples_blobclient/function_app.py" range="9-12,29-37":::
202180

203181
For examples of using other SDK types, see the [`ContainerClient`](https://github.com/Azure/azure-functions-python-extensions/blob/dev/azurefunctions-extensions-bindings-blob/samples/blob_samples_containerclient/function_app.py) and [`StorageStreamDownloader`](https://github.com/Azure/azure-functions-python-extensions/blob/dev/azurefunctions-extensions-bindings-blob/samples/blob_samples_storagestreamdownloader/function_app.py) samples. For a step-by-step tutorial on how to include SDK-type bindings in your function app, follow the [Python SDK Bindings for Blob Sample](https://github.com/Azure-Samples/azure-functions-blob-sdk-bindings-python).
204182

articles/azure-functions/functions-reference-python.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,6 @@ Note that with this approach, no additional package or setup is required. The fu
13651365
> [!NOTE]
13661366
> Durable Functions require special syntax for unit testing. For more information, refer to [Unit Testing Durable Functions in Python](durable/durable-functions-unit-testing-python.md)
13671367
1368-
13691368
::: zone-end
13701369

13711370
## Temporary files

articles/azure-functions/functions-run-local.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,9 @@ The following considerations apply when using the administrator endpoint for loc
347347

348348
+ Calling an administrator endpoint and passing test data is similar to using the **Test** tab in the Azure portal.
349349

350-
+ When supplying complex JSON objects, the data must be escaped properly, and the JSON-formatted string must include a `SystemProperties` element. This example shows a properly escaped JSON string with both a `testData` object and `SystemProperties`:
351-
`'{"input": "{\"SystemProperties\":{},\"testData\":{\"testid\":\"123\"}"}'`
350+
+ If the input is a complex JSON object, additional formatting is needed. The data must be properly escaped and include a `SystemProperties` object.
351+
This example shows a properly escaped JSON string with both a `testData` object and `SystemProperties`:
352+
`'{"input": "{\"SystemProperties\":{},\"testData\":{\"testid\":\"123\"}"}'`
352353
### [Event Grid trigger](#tab/event-grid-trigger)
353354

354355
Event Grid triggers have specific requirements to enable local testing. For more information, see [Local testing with viewer web app](event-grid-how-tos.md#local-testing-with-viewer-web-app).

0 commit comments

Comments
 (0)