Forum Discussion

DevendraKumar2's avatar
DevendraKumar2
Copper Contributor
Oct 25, 2024

Function App Service

Hi, 

I'm having trouble deploying my Python script to an Azure Function App. Can someone help me troubleshoot the deployment process and ensure the function works correctly?

I have followed all the articles available on the internet, I am not able to figure out , where is actual issue?

  • DevendraKumar2 

    To troubleshoot the Python Azure Function App deployment:

    Check Requirements: Ensure a requirements.txt file lists all dependencies.

    Verify Structure: Follow this structure:
    MyFunctionApp
    ├── my_function
    │   ├── __init__.py
    │   ├── function.json
    └── requirements.txt

    Check App Settings: In Azure Portal, match PYTHON_VERSION and set any required environment variables.

    Deploy with CLI:
    func azure functionapp publish <YOUR_FUNCTION_APP_NAME>

    Check Logs: In Azure Portal, go to Log stream for errors.

    Test Locally:
    func start

    Check logs for specific errors.

  • You can deploy the code from vs Code:
    Please refer below
    https://medium.com/@saurabh.dasgupta1/developing-and-deploying-a-python-azure-function-step-by-step-83c5066a2531

Resources