Difference between WSGI and ASGI ?

Wired Wisdom
Analytics Vidhya
Published in
3 min readJul 24, 2020

--

This is a short story which will give you an idea about what is WSGI and ASGI.

Source

Before 2003 Python had a wide variety of web application frameworks such as Zope, Quixote, Webware, SkunkWeb etc. But the problem was for new python users that they have to chose a frame work from above which limit their choice of usable web servers, vice versa. Thus the framework WSGI is released.

WSGI

WSGI is a standard interface which allows to seperate server code from the application code where you add your business logic. WSGI succeeded in allowing much more freedom and innovation in the Python web space.

In WSGI applications takes a single request and returns response at a time. This single and synchronous callable limits WSGI for long lived connections like websocket connections. Even if we made the application asynchronous callable it only has a single path to provide request.

Source

WSGI (stands for Web Server Gateway Interface) is simple where you can define your application as a callable that takes two arguments the first argument environ describes the request and the environment the server running in and the second argument is a…

--

--