put on Azure

Thibaut Fabrice 0 Reputation points
2026-06-08T04:37:05.1733333+00:00

Dear Sir/Madam,

How to put a python folder to host on Azure on cloud to be viewed by people.

User's image

Awaiting your reply,

Best Regards,

Fabrice
edited PII information

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Newest
  1. AI answer

    2026-06-08T04:37:24.99+00:00

    To host a Python web app folder on Azure so others can view it, use Azure App Service and deploy the code as a web app.

    1. Prepare the Python app
      • Ensure the folder is a web app using a framework like Django, Flask, or FastAPI.
      • Add a requirements.txt file listing all Python packages.
    2. Create the web app in Azure (one-time)
      • Install the Azure CLI on the local machine.
      • In a terminal, go to the Python project folder.
      • Sign in:
             az login
        
      • Create and deploy the web app in one step:
             az webapp up --runtime PYTHON:3.14 --sku B1 --logs
        
      • When the command finishes, it prints the web app URL. That URL is what people can use to view the app.
    3. Update and redeploy later
      • After changing the Python code, from the same project folder run:
             az webapp up
        
      • The command re-deploys the updated folder to the same web app.
    4. Alternative: zip deploy
      • Create a ZIP file of the Python project (excluding virtual environments and hidden folders).
      • Enable build automation on the web app by setting the SCM_DO_BUILD_DURING_DEPLOYMENT app setting to true in the Azure portal or with Azure CLI.
      • Deploy the ZIP file:
             az webapp deploy \
                 --name <app-service-name> \
                 --resource-group <resource-group-name> \
                 --src-path <zip-file-path>
        
      • Share the web app URL with users.

    These steps host the Python folder as a web application on Azure App Service so it can be accessed over the internet.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.