Prerequisites:
Before we begin, make sure you have the following
prerequisites set up:
1.Visual Studio Code installed on your machine.
2.Azure Functions Core Tools installed globally.
3.Azure Functions Extension for Visual Studio Code installed.
after installing the above prerequisites go to visual studio code and in the left hand side bar click on azure icon it will ask you to sign in to you azure account.after successfull login you will be able to see local workspace at the left hand side bar
you will able to see workspace
after this create new project
you will be prompted to** select programming language
python v2 programing model.**
if you are asking
Http Trigger
Time Trigger
Azure Blob Storage
Azure Cosmos Db Trigger
etc
select for any change in the above cases your function need to call select that particular trigger
you will get the following files after successful creation of function
- function_app.py
- host.json
- local.settings.json
- requirements.txt
here make sure your local settings are like env variables in python these wont be deployed when we deploy this to azure functions , these variables we need to defines in app settings when deployed .
create function app code in function_app.py and all the requirements in requirements now you can test the changes locally.
after sucessfully testing the changes we can directly deploy from in the same local workspace to deploy app.
Top comments (0)