I wanted to know how we can host client-server model using python on Microsoft azure ?

Adam 1 Reputation point
2020-12-08T11:19:28.433+00:00

I am facing an issue with hosting a client-server model using python sockets on Microsoft azure, but my code is working well on local but not on azure.
Please help me with the right deployment process on Azure.

Thank you

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,791 Reputation points Microsoft Employee
    2020-12-11T04:16:11.433+00:00

    @Adam The answer is yes, Python websocket support on Azure Web Apps. The necessary steps or guideline as below.

    First of all, you need to enable the WEB SOCKETS option of Application settings to ON on Azure portal, as the blog says below, it's matter with any languages.
    47271-screenshot-2020-12-10-231352.jpg

    Azure IIS supports Python webapp using WSGI, you can refer to the tutorial to know it and follow the tutorial content to build & configure your Python webapp with WSGI.

    There is a similar Combining websockets and WSGI in a python app SO thread which had been answered about the feasibility for websocket with WSGI in Python. And as references, there are some packages supported this combination, such as Eventlet, dwebsocket for Django, etc that you can search the words websocket & wsgi to know more.

    0 comments No comments