File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -301,19 +301,20 @@ import azure.functions as func
301
301
302
302
app = func.FunctionApp()
303
303
304
- @app.route (route = " table_out_binding" , binding_arg_name = " message " )
305
- @app.table_output (arg_name = " $return " ,
304
+ @app.route (route = " table_out_binding" )
305
+ @app.table_output (arg_name = " message " ,
306
306
connection = " AzureWebJobsStorage" ,
307
307
table_name = " messages" )
308
- def table_out_binding (req : func.HttpRequest, message : func.Out[func.HttpResponse ]):
309
- rowKey = str (uuid.uuid4())
308
+ def table_out_binding (req : func.HttpRequest, message : func.Out[str ]):
309
+ row_key = str (uuid.uuid4())
310
310
data = {
311
311
" Name" : " Output binding message" ,
312
312
" PartitionKey" : " message" ,
313
- " RowKey" : rowKey
313
+ " RowKey" : row_key
314
314
}
315
- message.set(json.dumps(data))
316
- return func.HttpResponse(f " Message created with the rowKey: { rowKey} " )
315
+ table_json = json.dumps(data)
316
+ message.set(table_json)
317
+ return table_json
317
318
```
318
319
319
320
# [ v1] ( #tab/python-v1 )
Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ import logging
483
483
app = func.FunctionApp()
484
484
485
485
@app.route (route = " req" )
486
- @app.read_blob (arg_name = " obj" , path = " samples/{id} " ,
486
+ @app.blob_input (arg_name = " obj" , path = " samples/{id} " ,
487
487
connection = " STORAGE_CONNECTION_STRING" )
488
488
def main (req : func.HttpRequest, obj : func.InputStream):
489
489
logging.info(f ' Python HTTP-triggered function processed: { obj.read()} ' )
@@ -1397,10 +1397,10 @@ The Python standard library contains a list of built-in Python modules that are
1397
1397
To view the library for your Python version, go to:
1398
1398
1399
1399
1400
- * [ Python 3.8 standard library] ( https://docs.python.org/3.8/library/ )
1401
1400
* [ Python 3.9 standard library] ( https://docs.python.org/3.9/library/ )
1402
1401
* [ Python 3.10 standard library] ( https://docs.python.org/3.10/library/ )
1403
1402
* [ Python 3.11 standard library] ( https://docs.python.org/3.11/library/ )
1403
+ * [ Python 3.12 standard library] ( https://docs.python.org/3.12/library/ )
1404
1404
1405
1405
### Azure Functions Python worker dependencies
1406
1406
You can’t perform that action at this time.
0 commit comments