Functions.Templates/Templates-v2/EventGridBlobTrigger-Python/function_app.py (9 lines of code) (raw):

import azure.functions as func import logging app = func.FunctionApp() @app.blob_trigger(arg_name="myblob", path="$(PATH_TO_BLOB_INPUT)", source="EventGrid", connection="$(CONNECTION_STRING_INPUT)") def $(FUNCTION_NAME_INPUT)(myblob: func.InputStream): logging.info(f"Python blob trigger (using Event Grid) function processed blob" f"Name: {myblob.name}" f"Blob Size: {myblob.length} bytes")