Jump to content

Asynchronous Server Gateway Interface

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ibakirov (talk | contribs) at 13:18, 14 September 2022 (Asynchronous Server Gateway Interface (ASGI) servers). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Asynchronous Server Gateway Interface (ASGI) is a calling convention for web servers to forward requests to asynchronous-capable Python programming language frameworks, and applications. It is built as a successor to the Web Server Gateway Interface (WSGI).

Where WSGI provided a standard for synchronous Python application, ASGI provides one for both asynchronous and synchronous applications, with a WSGI backwards-compatibility implementation and multiple servers and application frameworks.

Asynchronous Server Gateway Interface (ASGI) servers

Below listed some complete or upcoming implementations of Asynchronous Server Gateway Interface (ASGI Specification) - web servers and frameworks.

Daphne

Daphne is a Hypertext Transfer Protocol, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django (web framework) Channels. It supports automatic negotiation of protocols; there's no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints.[1]

Uvicorn

Uvicorn is an ASGI web server implementation for Python (programming language). Uvicorn currently supports HTTP/1.1 and WebSockets.[2]

Hypercorn

Hypercorn is an ASGI and WSGI web server based on the sans-io hyper, h11, h2, and wsproto libraries and inspired by Gunicorn. Hypercorn supports HTTP/1, HTTP/2, WebSockets (over HTTP/1 and HTTP/2), ASGI, and WSGI specifications. Hypercorn can utilise asyncio, uvloop, or trio worker types.[3]

See also

References

  1. ^ "Daphne Website". Retrieved 2022-09-14.
  2. ^ "Uvicorn Website". Retrieved 2022-09-14.
  3. ^ "Hypercorn Website". Retrieved 2022-09-14.