I have an Azure Function as below:
import azure.functions as func
import logging
import os
import tempfile
import subprocess
import json
from pathlib import Path
import glob
app = func.FunctionApp()
@app.blob_trigger(
arg_name="myblob",
path="cssinputbuckettest/{name}.MF4",
connection="cssdatalakestoragegen2_STORAGE",
)
def BlobTrigger1(myblob: func.InputStream):
logging.info(
f"Python blob trigger function processed blob "
f"Name: {myblob.name} "
f"Blob Size: {myblob.length} bytes"
)
...
I can publish my function without issues.
However, in my script I need to use BlobServiceClient, BlobClient
to download other files than the trigger blob. Therefore I add the statement below after the other import statements:
from azure.storage.blob import BlobServiceClient, BlobClient
When doing this, however, my publish fails and no function is pushed. Should I download other blobs into my Function in a different way?