encyclopegia.org

Asynchronous Server Gateway Interface

The Asynchronous Server Gateway Interface (ASGI) is a calling convention for web servers to forward requests to asynchronous-capable Python frameworks, and applications. It is built as a successor to the Web Server Gateway Interface (WSGI). Where WSGI provided a standard for synchronous Python applications, ASGI provides one for both asynchronous and synchronous applications, with a WSGI backwards-compatibility implementation and multiple servers and application frameworks.

The Asynchronous Server Gateway Interface (ASGI) is a calling convention for web servers to forward requests to asynchronous-capable Python frameworks, and applications. It is built as a successor to the Web Server Gateway Interface (WSGI). Where WSGI provided a standard for synchronous Python applications, ASGI provides one for both asynchronous and synchronous applications, with a WSGI backwards-compatibility implementation and multiple servers and application frameworks. An ASGI-compatible "Hello, World!" application written in Python: async def application(scope, receive, send): event = await receive() ... await send({"type": "websocket.send", ...}) Where: Line 1 defines an asynchronous function named , which takes three parameters (unlike in WSGI which takes only two), , and . is a containing details about current connection, like the protocol, headers, etc. and are asynchronous callables which let the application receive and send messages from/to the client. Line 2 receives an incoming event, for example, HTTP request or WebSocket message. The keyword is used because the operation is asynchronous. Line 4 asynchronously sends a response back to the client. In this case, it is a WebSocket communication.

References

No reference rows published for this article.

Cite this article

MLA

"Asynchronous Server Gateway Interface." encyclopegia.org, 2026, https://encyclopegia.org/wiki/asynchronous-server-gateway-interface. Accessed 24 November 2026.

Chicago

"Asynchronous Server Gateway Interface." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/asynchronous-server-gateway-interface.

APA

encyclopegia.org. (2026). Asynchronous Server Gateway Interface. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/asynchronous-server-gateway-interface

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Border Gateway Protocol

stub · references available

web server

stub · references available

root name server

stub · references available

Oracle WebLogic Server

stub · references available

ATL Server

stub · references available

Across Language Server

stub · references available

QuickTime Streaming Server

stub · references available

SQL Server

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375983516 · 0.5 · snapshot enwiki-001375983516

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.