I’m trying to publish 2 functions to my Azure function app, "copy-read-from-esb".
Everything is written in Python in VS Code. The problem is that it looks like it will only register in my function app if the name of the Python file is function_app.py
. But as I have 2, they cannot have the same name, and the one that is not called function_app.py
will not register in my function app.
It looks like Azure functions use a function.json
file, but I’m not certain how this works, nor if that only applies to C#.
I tried publishing through my CLI func azure functionapp publish ..
, and although this seems to work, I can only add one .py
file because the required naming convention is somehow set to function__app.py
.
2
Answers
Thank you, just to test quickly I added the function to the function_app.py:
Looks like the both find the functionapp after publishing. But It seems they cant find the connectionstring, although referenced in the app settings.
AzureWebJobsFeatureFlags is set to : EnableWorkerIndexing.
You need to add both the Functions in the same
function_app.py
file or you can create ablueprint file
and call all your Function triggers from there.Refer my SO answer1 to run 2 functions in
function_app.py
and SO answer2 for blueprint implemantation.I created 2 functions and added them in function_app.py:-
function_app.py:-
Commands to deploy the Function via CLI:-
Output:-
Both the Function Triggers got deployed successfully with function core tools command above.