1515@app .blob_trigger (arg_name = "file" ,
1616 path = "python-worker-tests/test-blob-trigger.txt" ,
1717 connection = "AzureWebJobsStorage" )
18- @app .write_blob (arg_name = "$return" ,
19- path = "python-worker-tests/test-blob-triggered.txt" ,
20- connection = "AzureWebJobsStorage" )
18+ @app .blob_output (arg_name = "$return" ,
19+ path = "python-worker-tests/test-blob-triggered.txt" ,
20+ connection = "AzureWebJobsStorage" )
2121def blob_trigger (file : func .InputStream ) -> str :
2222 return json .dumps ({
2323 'name' : file .name ,
@@ -28,21 +28,21 @@ def blob_trigger(file: func.InputStream) -> str:
2828
2929@app .function_name (name = "get_blob_as_bytes" )
3030@app .route (route = "get_blob_as_bytes" )
31- @app .read_blob (arg_name = "file" ,
32- path = "python-worker-tests/test-bytes.txt" ,
33- data_type = "BINARY" ,
34- connection = "AzureWebJobsStorage" )
31+ @app .blob_input (arg_name = "file" ,
32+ path = "python-worker-tests/test-bytes.txt" ,
33+ data_type = "BINARY" ,
34+ connection = "AzureWebJobsStorage" )
3535def get_blob_as_bytes (req : func .HttpRequest , file : bytes ) -> str :
3636 assert isinstance (file , bytes )
3737 return file .decode ('utf-8' )
3838
3939
4040@app .function_name (name = "get_blob_as_bytes_return_http_response" )
4141@app .route (route = "get_blob_as_bytes_return_http_response" )
42- @app .read_blob (arg_name = "file" ,
43- path = "python-worker-tests/shmem-test-bytes.txt" ,
44- data_type = "BINARY" ,
45- connection = "AzureWebJobsStorage" )
42+ @app .blob_input (arg_name = "file" ,
43+ path = "python-worker-tests/shmem-test-bytes.txt" ,
44+ data_type = "BINARY" ,
45+ connection = "AzureWebJobsStorage" )
4646def get_blob_as_bytes_return_http_response (req : func .HttpRequest , file : bytes ) \
4747 -> func .HttpResponse :
4848 """
@@ -70,10 +70,10 @@ def get_blob_as_bytes_return_http_response(req: func.HttpRequest, file: bytes) \
7070
7171@app .function_name (name = "get_blob_as_bytes_stream_return_http_response" )
7272@app .route (route = "get_blob_as_bytes_stream_return_http_response" )
73- @app .read_blob (arg_name = "file" ,
74- path = "python-worker-tests/shmem-test-bytes.txt" ,
75- data_type = "BINARY" ,
76- connection = "AzureWebJobsStorage" )
73+ @app .blob_input (arg_name = "file" ,
74+ path = "python-worker-tests/shmem-test-bytes.txt" ,
75+ data_type = "BINARY" ,
76+ connection = "AzureWebJobsStorage" )
7777def get_blob_as_bytes_stream_return_http_response (req : func .HttpRequest ,
7878 file : func .InputStream ) \
7979 -> func .HttpResponse :
@@ -102,21 +102,21 @@ def get_blob_as_bytes_stream_return_http_response(req: func.HttpRequest,
102102
103103@app .function_name (name = "get_blob_as_str" )
104104@app .route (route = "get_blob_as_str" )
105- @app .read_blob (arg_name = "file" ,
106- path = "python-worker-tests/test-str.txt" ,
107- data_type = "STRING" ,
108- connection = "AzureWebJobsStorage" )
105+ @app .blob_input (arg_name = "file" ,
106+ path = "python-worker-tests/test-str.txt" ,
107+ data_type = "STRING" ,
108+ connection = "AzureWebJobsStorage" )
109109def get_blob_as_str (req : func .HttpRequest , file : str ) -> str :
110110 assert isinstance (file , str )
111111 return file
112112
113113
114114@app .function_name (name = "get_blob_as_str_return_http_response" )
115115@app .route (route = "get_blob_as_str_return_http_response" )
116- @app .read_blob (arg_name = "file" ,
117- path = "python-worker-tests/shmem-test-bytes.txt" ,
118- data_type = "STRING" ,
119- connection = "AzureWebJobsStorage" )
116+ @app .blob_input (arg_name = "file" ,
117+ path = "python-worker-tests/shmem-test-bytes.txt" ,
118+ data_type = "STRING" ,
119+ connection = "AzureWebJobsStorage" )
120120def get_blob_as_str_return_http_response (req : func .HttpRequest ,
121121 file : str ) -> func .HttpResponse :
122122 """
@@ -145,54 +145,54 @@ def get_blob_as_str_return_http_response(req: func.HttpRequest,
145145
146146@app .function_name (name = "get_blob_bytes" )
147147@app .route (route = "get_blob_bytes" )
148- @app .read_blob (arg_name = "file" ,
149- path = "python-worker-tests/test-bytes.txt" ,
150- connection = "AzureWebJobsStorage" )
148+ @app .blob_input (arg_name = "file" ,
149+ path = "python-worker-tests/test-bytes.txt" ,
150+ connection = "AzureWebJobsStorage" )
151151def get_blob_bytes (req : func .HttpRequest , file : func .InputStream ) -> str :
152152 return file .read ().decode ('utf-8' )
153153
154154
155155@app .function_name (name = "get_blob_filelike" )
156156@app .route (route = "get_blob_filelike" )
157- @app .read_blob (arg_name = "file" ,
158- path = "python-worker-tests/test-filelike.txt" ,
159- connection = "AzureWebJobsStorage" )
157+ @app .blob_input (arg_name = "file" ,
158+ path = "python-worker-tests/test-filelike.txt" ,
159+ connection = "AzureWebJobsStorage" )
160160def get_blob_filelike (req : func .HttpRequest , file : func .InputStream ) -> str :
161161 return file .read ().decode ('utf-8' )
162162
163163
164164@app .function_name (name = "get_blob_return" )
165165@app .route (route = "get_blob_return" )
166- @app .read_blob (arg_name = "file" ,
167- path = "python-worker-tests/test-return.txt" ,
168- connection = "AzureWebJobsStorage" )
166+ @app .blob_input (arg_name = "file" ,
167+ path = "python-worker-tests/test-return.txt" ,
168+ connection = "AzureWebJobsStorage" )
169169def get_blob_return (req : func .HttpRequest , file : func .InputStream ) -> str :
170170 return file .read ().decode ('utf-8' )
171171
172172
173173@app .function_name (name = "get_blob_str" )
174174@app .route (route = "get_blob_str" )
175- @app .read_blob (arg_name = "file" ,
176- path = "python-worker-tests/test-str.txt" ,
177- connection = "AzureWebJobsStorage" )
175+ @app .blob_input (arg_name = "file" ,
176+ path = "python-worker-tests/test-str.txt" ,
177+ connection = "AzureWebJobsStorage" )
178178def get_blob_str (req : func .HttpRequest , file : func .InputStream ) -> str :
179179 return file .read ().decode ('utf-8' )
180180
181181
182182@app .function_name (name = "get_blob_triggered" )
183- @app .read_blob (arg_name = "file" ,
184- path = "python-worker-tests/test-blob-triggered.txt" ,
185- connection = "AzureWebJobsStorage" )
183+ @app .blob_input (arg_name = "file" ,
184+ path = "python-worker-tests/test-blob-triggered.txt" ,
185+ connection = "AzureWebJobsStorage" )
186186@app .route (route = "get_blob_triggered" )
187187def get_blob_triggered (req : func .HttpRequest , file : func .InputStream ) -> str :
188188 return file .read ().decode ('utf-8' )
189189
190190
191191@app .function_name (name = "put_blob_as_bytes_return_http_response" )
192- @app .write_blob (arg_name = "file" ,
193- path = "python-worker-tests/shmem-test-bytes-out.txt" ,
194- data_type = "BINARY" ,
195- connection = "AzureWebJobsStorage" )
192+ @app .blob_output (arg_name = "file" ,
193+ path = "python-worker-tests/shmem-test-bytes-out.txt" ,
194+ data_type = "BINARY" ,
195+ connection = "AzureWebJobsStorage" )
196196@app .route (route = "put_blob_as_bytes_return_http_response" )
197197def put_blob_as_bytes_return_http_response (req : func .HttpRequest ,
198198 file : func .Out [
@@ -231,13 +231,13 @@ def put_blob_as_bytes_return_http_response(req: func.HttpRequest,
231231
232232
233233@app .function_name (name = "put_blob_as_str_return_http_response" )
234- @app .write_blob (arg_name = "file" ,
235- path = "python-worker-tests/shmem-test-str-out.txt" ,
236- data_type = "STRING" ,
237- connection = "AzureWebJobsStorage" )
234+ @app .blob_output (arg_name = "file" ,
235+ path = "python-worker-tests/shmem-test-str-out.txt" ,
236+ data_type = "STRING" ,
237+ connection = "AzureWebJobsStorage" )
238238@app .route (route = "put_blob_as_str_return_http_response" )
239239def put_blob_as_str_return_http_response (req : func .HttpRequest , file : func .Out [
240- str ]) -> func .HttpResponse :
240+ str ]) -> func .HttpResponse :
241241 """
242242 Write a blob (string) and respond back (in HTTP response) with the number of
243243 characters written and the MD5 digest of the utf-8 encoded content.
@@ -269,19 +269,19 @@ def put_blob_as_str_return_http_response(req: func.HttpRequest, file: func.Out[
269269
270270
271271@app .function_name (name = "put_blob_bytes" )
272- @app .write_blob (arg_name = "file" ,
273- path = "python-worker-tests/test-bytes.txt" ,
274- connection = "AzureWebJobsStorage" )
272+ @app .blob_output (arg_name = "file" ,
273+ path = "python-worker-tests/test-bytes.txt" ,
274+ connection = "AzureWebJobsStorage" )
275275@app .route (route = "put_blob_bytes" )
276276def put_blob_bytes (req : func .HttpRequest , file : func .Out [bytes ]) -> str :
277277 file .set (req .get_body ())
278278 return 'OK'
279279
280280
281281@app .function_name (name = "put_blob_filelike" )
282- @app .write_blob (arg_name = "file" ,
283- path = "python-worker-tests/test-filelike.txt" ,
284- connection = "AzureWebJobsStorage" )
282+ @app .blob_output (arg_name = "file" ,
283+ path = "python-worker-tests/test-filelike.txt" ,
284+ connection = "AzureWebJobsStorage" )
285285@app .route (route = "put_blob_filelike" )
286286def put_blob_filelike (req : func .HttpRequest ,
287287 file : func .Out [io .StringIO ]) -> str :
@@ -290,29 +290,29 @@ def put_blob_filelike(req: func.HttpRequest,
290290
291291
292292@app .function_name (name = "put_blob_return" )
293- @app .write_blob (arg_name = "$return" ,
294- path = "python-worker-tests/test-return.txt" ,
295- connection = "AzureWebJobsStorage" )
293+ @app .blob_output (arg_name = "$return" ,
294+ path = "python-worker-tests/test-return.txt" ,
295+ connection = "AzureWebJobsStorage" )
296296@app .route (route = "put_blob_return" , binding_arg_name = "resp" )
297297def put_blob_return (req : func .HttpRequest ,
298298 resp : func .Out [func .HttpResponse ]) -> str :
299299 return 'FROM RETURN'
300300
301301
302302@app .function_name (name = "put_blob_str" )
303- @app .write_blob (arg_name = "file" ,
304- path = "python-worker-tests/test-str.txt" ,
305- connection = "AzureWebJobsStorage" )
303+ @app .blob_output (arg_name = "file" ,
304+ path = "python-worker-tests/test-str.txt" ,
305+ connection = "AzureWebJobsStorage" )
306306@app .route (route = "put_blob_str" )
307307def put_blob_str (req : func .HttpRequest , file : func .Out [str ]) -> str :
308308 file .set (req .get_body ())
309309 return 'OK'
310310
311311
312312@app .function_name (name = "put_blob_trigger" )
313- @app .write_blob (arg_name = "file" ,
314- path = "python-worker-tests/test-blob-trigger.txt" ,
315- connection = "AzureWebJobsStorage" )
313+ @app .blob_output (arg_name = "file" ,
314+ path = "python-worker-tests/test-blob-trigger.txt" ,
315+ connection = "AzureWebJobsStorage" )
316316@app .route (route = "put_blob_trigger" )
317317def put_blob_trigger (req : func .HttpRequest , file : func .Out [str ]) -> str :
318318 file .set (req .get_body ())
@@ -326,22 +326,22 @@ def _generate_content_and_digest(content_size):
326326
327327
328328@app .function_name (name = "put_get_multiple_blobs_as_bytes_return_http_response" )
329- @app .read_blob (arg_name = "inputfile1" ,
330- data_type = "BINARY" ,
331- path = "python-worker-tests/shmem-test-bytes-1.txt" ,
332- connection = "AzureWebJobsStorage" )
333- @app .read_blob (arg_name = "inputfile2" ,
334- data_type = "BINARY" ,
335- path = "python-worker-tests/shmem-test-bytes-2.txt" ,
336- connection = "AzureWebJobsStorage" )
337- @app .write_blob (arg_name = "outputfile1" ,
338- path = "python-worker-tests/shmem-test-bytes-out-1.txt" ,
329+ @app .blob_input (arg_name = "inputfile1" ,
339330 data_type = "BINARY" ,
331+ path = "python-worker-tests/shmem-test-bytes-1.txt" ,
340332 connection = "AzureWebJobsStorage" )
341- @app .write_blob (arg_name = "outputfile2" ,
342- path = "python-worker-tests/shmem-test-bytes-out-2.txt" ,
333+ @app .blob_input (arg_name = "inputfile2" ,
343334 data_type = "BINARY" ,
335+ path = "python-worker-tests/shmem-test-bytes-2.txt" ,
344336 connection = "AzureWebJobsStorage" )
337+ @app .blob_output (arg_name = "outputfile1" ,
338+ path = "python-worker-tests/shmem-test-bytes-out-1.txt" ,
339+ data_type = "BINARY" ,
340+ connection = "AzureWebJobsStorage" )
341+ @app .blob_output (arg_name = "outputfile2" ,
342+ path = "python-worker-tests/shmem-test-bytes-out-2.txt" ,
343+ data_type = "BINARY" ,
344+ connection = "AzureWebJobsStorage" )
345345@app .route (route = "put_get_multiple_blobs_as_bytes_return_http_response" )
346346def put_get_multiple_blobs_as_bytes_return_http_response (
347347 req : func .HttpRequest ,
0 commit comments