Knowledge (XXG)

Asynchronous Server Gateway Interface

Source 📝

477: 709: 22: 224: 598: 756: 1729: 962: 855: 461:
applications to be run inside ASGI servers through a translation wrapper (provided in the asgiref library). A threadpool can be used to run the synchronous
1929: 591: 1017: 997: 490: 98: 70: 1934: 584: 46:
of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be
1082: 77: 482: 217: 848: 617: 84: 717: 210: 117: 66: 43: 1399: 841: 250: 285: 1907: 1883: 1863: 1635: 864: 607: 500: 289: 269: 254: 39: 1792: 990: 774: 505: 462: 458: 454: 273: 265: 258: 55: 1897: 1774: 1741: 1247: 1849: 816: 91: 1199: 1879: 1754: 1698: 1320: 1179: 983: 926: 810: 696: 32: 1782: 1703: 1658: 1374: 1232: 931: 891: 444:
Line 4 asynchronously sends a response back to the client. In this case, it is a WebSocket communication.
1668: 1409: 1189: 901: 524: 538: 51: 1800: 1708: 1673: 1525: 1334: 1184: 1050: 936: 906: 789: 47: 1565: 1447: 1267: 1087: 430:
are asynchronous callables which let the application receive and send messages from/to the client.
1859: 1833: 1764: 1555: 1505: 1217: 1212: 946: 1903: 1585: 1580: 1457: 1452: 1120: 1065: 821: 750: 1600: 1530: 1404: 1262: 1143: 1135: 1125: 797: 685: 1277: 725: 690: 272:
application, ASGI provides one for both asynchronous and synchronous applications, with a
571: 167: 276:
backwards-compatibility implementation and multiple servers and application frameworks.
1805: 1693: 1688: 1550: 1302: 1242: 921: 916: 675: 435:
Line 2 receives an incoming event, for example, HTTP request or WebSocket message. The
1923: 1759: 1292: 1272: 1237: 1060: 1006: 867: 625: 192: 1414: 1339: 1257: 1045: 1040: 708: 1590: 1490: 1462: 1369: 1329: 1153: 1055: 645: 1893: 1889: 1713: 1570: 1520: 1500: 1419: 1349: 1312: 1252: 1097: 1077: 941: 655: 472: 246: 416:
containing details about current connection, like the protocol, headers, etc.
1820: 1615: 1510: 1324: 1297: 735: 680: 1828: 1810: 1653: 1648: 1575: 1379: 1344: 1227: 1222: 886: 881: 630: 833: 1869: 1663: 1605: 1545: 1540: 1515: 1485: 1394: 1389: 1384: 1207: 1171: 1161: 1092: 1035: 896: 740: 635: 495: 384:, which takes three parameters (unlike in WSGI which takes only two), 1853: 1718: 1535: 1495: 1467: 1429: 1424: 1364: 1354: 1287: 1282: 1115: 1072: 951: 660: 640: 543: 457:, and there's a defined way of translating between the two, allowing 1107: 1678: 1620: 1610: 1595: 911: 745: 665: 650: 975: 38:
Please help to demonstrate the notability of the topic by citing
1749: 1723: 1683: 1643: 1560: 1439: 1359: 1027: 956: 730: 670: 257:
frameworks, and applications. It is built as a successor to the
979: 837: 580: 1873: 1625: 1477: 566: 15: 576: 441:
keyword is used because the operation is asynchronous.
1842: 1819: 1791: 1773: 1740: 1634: 1476: 1438: 1311: 1198: 1170: 1152: 1134: 1106: 1026: 788: 767: 716: 616: 572:
Asynchronous Server Gateway Interface Specification
567:
Asynchronous Server Gateway Interface Documentation
436: 425: 419: 411: 405: 397: 391: 385: 379: 198: 188: 162: 154: 146: 138: 449:Web Server Gateway Interface (WSGI) compatibility 378:Line 1 defines an asynchronous function named 991: 849: 592: 465:applications away from the async event loop. 218: 8: 133: 998: 984: 976: 856: 842: 834: 599: 585: 577: 453:ASGI is also designed to be a superset of 225: 211: 118:Learn how and when to remove this message 516: 67:"Asynchronous Server Gateway Interface" 132: 239:Asynchronous Server Gateway Interface 7: 483:Free and open-source software portal 268:provided a standard for synchronous 506:Web Server Gateway Interface (WSGI) 1930:Free software programmed in Python 130:Calling convention for web servers 14: 707: 475: 20: 31:may not meet Knowledge (XXG)'s 245:) is a calling convention for 1: 1935:Python (programming language) 501:Python (programming language) 491:Comparison of web frameworks 259:Web Server Gateway Interface 33:general notability guideline 1248:Remote Application Platform 1951: 817:Python Software Foundation 360:"websocket.send" 40:reliable secondary sources 29:The topic of this article 1013: 874: 806: 705: 288:" application written in 206: 294: 249:to forward requests to 284:An ASGI-compatible " 1850:Application Express 135: 134:ASGI Specification 35: 1917: 1916: 973: 972: 831: 830: 822:Python Conference 525:"Version History" 235: 234: 128: 127: 120: 102: 30: 1942: 1144:ColdBox Platform 1000: 993: 986: 977: 858: 851: 844: 835: 798:Guido van Rossum 711: 686:Stackless Python 610: 601: 594: 587: 578: 555: 554: 552: 551: 535: 529: 528: 521: 485: 480: 479: 478: 440: 439: 429: 428: 423: 422: 415: 414: 409: 408: 401: 400: 395: 394: 389: 388: 383: 382: 370: 367: 364: 361: 358: 355: 354:"type" 352: 349: 346: 343: 340: 337: 334: 331: 328: 325: 322: 319: 316: 313: 310: 307: 304: 301: 298: 227: 220: 213: 184: 181: 179: 177: 175: 173: 171: 169: 136: 123: 116: 112: 109: 103: 101: 60: 24: 23: 16: 1950: 1949: 1945: 1944: 1943: 1941: 1940: 1939: 1920: 1919: 1918: 1913: 1843:Other languages 1838: 1815: 1787: 1769: 1736: 1630: 1472: 1434: 1307: 1194: 1166: 1148: 1130: 1102: 1022: 1009: 1004: 974: 969: 870: 862: 832: 827: 802: 784: 763: 712: 703: 691:Unladen Swallow 618:Implementations 612: 608: 605: 563: 558: 549: 547: 537: 536: 532: 523: 522: 518: 514: 481: 476: 474: 471: 451: 437: 426: 420: 412: 406: 398: 392: 386: 380: 372: 371: 368: 365: 362: 359: 356: 353: 350: 347: 344: 341: 338: 335: 332: 329: 326: 323: 320: 317: 314: 311: 308: 305: 302: 299: 296: 282: 231: 166: 131: 124: 113: 107: 104: 61: 59: 37: 25: 21: 12: 11: 5: 1948: 1946: 1938: 1937: 1932: 1922: 1921: 1915: 1914: 1912: 1911: 1901: 1887: 1877: 1867: 1857: 1846: 1844: 1840: 1839: 1837: 1836: 1831: 1825: 1823: 1817: 1816: 1814: 1813: 1808: 1803: 1797: 1795: 1789: 1788: 1786: 1785: 1779: 1777: 1771: 1770: 1768: 1767: 1762: 1757: 1752: 1746: 1744: 1738: 1737: 1735: 1734: 1726: 1721: 1716: 1711: 1706: 1701: 1696: 1691: 1686: 1681: 1676: 1671: 1666: 1661: 1656: 1651: 1646: 1640: 1638: 1632: 1631: 1629: 1628: 1623: 1618: 1613: 1608: 1603: 1598: 1593: 1588: 1583: 1578: 1573: 1568: 1563: 1558: 1553: 1548: 1543: 1538: 1533: 1528: 1523: 1518: 1513: 1508: 1503: 1498: 1493: 1488: 1482: 1480: 1474: 1473: 1471: 1470: 1465: 1460: 1455: 1450: 1444: 1442: 1436: 1435: 1433: 1432: 1427: 1422: 1417: 1412: 1407: 1402: 1397: 1392: 1387: 1382: 1377: 1372: 1367: 1362: 1357: 1352: 1347: 1342: 1337: 1332: 1327: 1317: 1315: 1309: 1308: 1306: 1305: 1300: 1295: 1290: 1285: 1280: 1275: 1270: 1265: 1260: 1255: 1250: 1245: 1240: 1235: 1230: 1225: 1220: 1215: 1210: 1204: 1202: 1196: 1195: 1193: 1192: 1187: 1182: 1176: 1174: 1168: 1167: 1165: 1164: 1158: 1156: 1150: 1149: 1147: 1146: 1140: 1138: 1132: 1131: 1129: 1128: 1123: 1118: 1112: 1110: 1104: 1103: 1101: 1100: 1095: 1090: 1085: 1080: 1075: 1070: 1069: 1068: 1063: 1058: 1053: 1048: 1043: 1032: 1030: 1024: 1023: 1021: 1020: 1014: 1011: 1010: 1007:Web frameworks 1005: 1003: 1002: 995: 988: 980: 971: 970: 968: 967: 959: 954: 949: 944: 939: 934: 929: 924: 919: 914: 909: 904: 899: 894: 889: 884: 879: 875: 872: 871: 868:web frameworks 863: 861: 860: 853: 846: 838: 829: 828: 826: 825: 819: 814: 807: 804: 803: 801: 800: 794: 792: 786: 785: 783: 782: 777: 771: 769: 765: 764: 762: 761: 753: 748: 743: 738: 733: 728: 722: 720: 714: 713: 706: 704: 702: 701: 693: 688: 683: 678: 676:Python for S60 673: 668: 663: 658: 653: 648: 643: 638: 633: 628: 622: 620: 614: 613: 606: 604: 603: 596: 589: 581: 575: 574: 569: 562: 561:External links 559: 557: 556: 530: 515: 513: 510: 509: 508: 503: 498: 493: 487: 486: 470: 467: 450: 447: 446: 445: 442: 433: 432: 431: 417: 295: 281: 278: 233: 232: 230: 229: 222: 215: 207: 204: 203: 200: 196: 195: 190: 186: 185: 164: 160: 159: 156: 152: 151: 148: 144: 143: 140: 129: 126: 125: 28: 26: 19: 13: 10: 9: 6: 4: 3: 2: 1947: 1936: 1933: 1931: 1928: 1927: 1925: 1909: 1905: 1902: 1899: 1895: 1891: 1888: 1885: 1881: 1878: 1875: 1871: 1868: 1865: 1861: 1858: 1855: 1851: 1848: 1847: 1845: 1841: 1835: 1832: 1830: 1827: 1826: 1824: 1822: 1818: 1812: 1809: 1807: 1804: 1802: 1799: 1798: 1796: 1794: 1790: 1784: 1781: 1780: 1778: 1776: 1772: 1766: 1763: 1761: 1760:Ruby on Rails 1758: 1756: 1753: 1751: 1748: 1747: 1745: 1743: 1739: 1732: 1731: 1727: 1725: 1722: 1720: 1717: 1715: 1712: 1710: 1707: 1705: 1702: 1700: 1697: 1695: 1692: 1690: 1687: 1685: 1682: 1680: 1677: 1675: 1672: 1670: 1667: 1665: 1662: 1660: 1657: 1655: 1652: 1650: 1647: 1645: 1642: 1641: 1639: 1637: 1633: 1627: 1624: 1622: 1619: 1617: 1614: 1612: 1609: 1607: 1604: 1602: 1599: 1597: 1594: 1592: 1589: 1587: 1584: 1582: 1579: 1577: 1574: 1572: 1569: 1567: 1564: 1562: 1559: 1557: 1554: 1552: 1549: 1547: 1544: 1542: 1539: 1537: 1534: 1532: 1529: 1527: 1524: 1522: 1519: 1517: 1514: 1512: 1509: 1507: 1504: 1502: 1499: 1497: 1494: 1492: 1489: 1487: 1484: 1483: 1481: 1479: 1475: 1469: 1466: 1464: 1461: 1459: 1456: 1454: 1451: 1449: 1446: 1445: 1443: 1441: 1437: 1431: 1428: 1426: 1423: 1421: 1418: 1416: 1413: 1411: 1408: 1406: 1403: 1401: 1398: 1396: 1393: 1391: 1388: 1386: 1383: 1381: 1378: 1376: 1373: 1371: 1368: 1366: 1363: 1361: 1358: 1356: 1353: 1351: 1348: 1346: 1343: 1341: 1338: 1336: 1333: 1331: 1328: 1326: 1322: 1319: 1318: 1316: 1314: 1310: 1304: 1301: 1299: 1296: 1294: 1291: 1289: 1286: 1284: 1281: 1279: 1276: 1274: 1271: 1269: 1266: 1264: 1261: 1259: 1256: 1254: 1251: 1249: 1246: 1244: 1241: 1239: 1236: 1234: 1231: 1229: 1226: 1224: 1221: 1219: 1216: 1214: 1211: 1209: 1206: 1205: 1203: 1201: 1197: 1191: 1188: 1186: 1183: 1181: 1178: 1177: 1175: 1173: 1169: 1163: 1160: 1159: 1157: 1155: 1151: 1145: 1142: 1141: 1139: 1137: 1133: 1127: 1124: 1122: 1119: 1117: 1114: 1113: 1111: 1109: 1105: 1099: 1096: 1094: 1091: 1089: 1086: 1084: 1081: 1079: 1076: 1074: 1071: 1067: 1064: 1062: 1059: 1057: 1054: 1052: 1049: 1047: 1044: 1042: 1039: 1038: 1037: 1034: 1033: 1031: 1029: 1025: 1019: 1016: 1015: 1012: 1008: 1001: 996: 994: 989: 987: 982: 981: 978: 965: 964: 960: 958: 955: 953: 950: 948: 945: 943: 940: 938: 935: 933: 930: 928: 925: 923: 920: 918: 915: 913: 910: 908: 905: 903: 900: 898: 895: 893: 890: 888: 885: 883: 880: 877: 876: 873: 869: 866: 859: 854: 852: 847: 845: 840: 839: 836: 823: 820: 818: 815: 812: 809: 808: 805: 799: 796: 795: 793: 791: 787: 781: 778: 776: 773: 772: 770: 766: 760: 758: 754: 752: 749: 747: 744: 742: 739: 737: 734: 732: 729: 727: 724: 723: 721: 719: 715: 710: 700: 698: 694: 692: 689: 687: 684: 682: 679: 677: 674: 672: 669: 667: 664: 662: 659: 657: 654: 652: 649: 647: 644: 642: 639: 637: 634: 632: 629: 627: 626:CircuitPython 624: 623: 621: 619: 615: 611: 602: 597: 595: 590: 588: 583: 582: 579: 573: 570: 568: 565: 564: 560: 546: 545: 540: 534: 531: 526: 520: 517: 511: 507: 504: 502: 499: 497: 494: 492: 489: 488: 484: 473: 468: 466: 464: 460: 456: 448: 443: 434: 418: 404: 403: 377: 376: 375: 293: 291: 287: 286:Hello, World! 279: 277: 275: 271: 267: 262: 260: 256: 252: 248: 244: 240: 228: 223: 221: 216: 214: 209: 208: 205: 201: 197: 194: 193:public domain 191: 187: 183: 165: 161: 157: 153: 149: 145: 141: 137: 122: 119: 111: 108:December 2023 100: 97: 93: 90: 86: 83: 79: 76: 72: 69: –  68: 64: 63:Find sources: 57: 53: 49: 45: 41: 34: 27: 18: 17: 1728: 1601:Silverstripe 1415:Sencha Touch 1340:Dojo Toolkit 1051:Dynamic Data 961: 779: 755: 695: 548:. Retrieved 542: 533: 519: 452: 373: 283: 263: 251:asynchronous 242: 238: 236: 170:.readthedocs 155:Release date 114: 105: 95: 88: 81: 74: 62: 1591:ProcessWire 1491:CodeIgniter 1463:Mojolicious 1370:Knockout.js 1330:Backbone.js 1154:Common Lisp 646:MicroPython 539:"Copyright" 381:application 303:application 247:web servers 44:independent 1924:Categories 1894:JavaScript 1890:SproutCore 1714:TurboGears 1571:PHP-Fusion 1501:eZ Publish 1420:SproutCore 1350:Express.js 1313:JavaScript 1136:ColdFusion 1098:WebSharper 1018:Comparison 947:TwistedWeb 942:TurboGears 656:IronPython 550:2022-09-14 512:References 158:2019-03-04 78:newspapers 52:redirected 1821:Smalltalk 1644:BlueBream 1616:WordPress 1526:Gyroscope 1400:Prototype 1325:AngularJS 1298:WaveMaker 1066:Web Forms 736:Ninja-IDE 681:Shed Skin 253:-capable 150:ASGI Team 147:Developer 42:that are 1829:AIDA/Web 1811:Scalatra 1654:CubicWeb 1649:CherryPy 1576:PHP-Nuke 1506:Fat-Free 1448:Catalyst 1380:MooTools 1345:Ember.js 1278:Tapestry 1228:JHipster 1223:ICEfaces 1088:MonoRail 887:CubicWeb 882:CherryPy 811:Software 790:Designer 631:CLPython 469:See also 261:(WSGI). 1880:Phoenix 1870:OpenACS 1834:Seaside 1765:Sinatra 1755:Padrino 1709:Tornado 1699:Quixote 1694:Pyramid 1664:FastAPI 1606:Symfony 1581:Pop PHP 1566:Phalcon 1556:Midgard 1546:Laravel 1541:Laminas 1536:Joomla! 1516:FuelPHP 1486:CakePHP 1458:Maypole 1395:OpenUI5 1390:Node.js 1385:Next.js 1335:Closure 1321:Angular 1268:Stripes 1238:Mojarra 1208:AppFuse 1180:Servant 1172:Haskell 1162:CL-HTTP 1093:Umbraco 1036:ASP.NET 937:Tornado 927:Quixote 922:Pyramid 897:FastAPI 824:(PyCon) 741:PyCharm 636:CPython 496:FastCGI 421:receive 393:receive 374:Where: 336:receive 315:receive 280:Example 189:License 176:/latest 163:Website 139:Version 92:scholar 56:deleted 1908:Erlang 1884:Elixir 1864:Groovy 1860:Grails 1854:PL/SQL 1783:Rocket 1724:Zope 2 1719:web2py 1704:TACTIC 1689:Pylons 1659:Django 1636:Python 1496:Drupal 1468:WebGUI 1453:Dancer 1430:Vue.js 1425:Svelte 1375:Meteor 1365:jQuery 1355:Ext JS 1293:Wicket 1288:Vert.x 1283:Vaadin 1273:Struts 1263:Spring 1213:Grails 1121:Drogon 1116:CppCMS 1073:Blazor 957:Zope 2 952:web2py 932:TACTIC 917:Pylons 892:Django 878:Bottle 865:Python 813:(list) 768:Topics 751:Spyder 661:Jython 641:Cython 609:Python 544:GitHub 290:Python 270:Python 264:Where 255:Python 199:Status 180:/index 178:/specs 94:  87:  80:  73:  65:  48:merged 1793:Scala 1679:Nevow 1669:Flask 1621:XOOPS 1611:TYPO3 1596:Qcodo 1586:PRADO 1531:Horde 1410:Remix 1405:React 1258:Sling 1190:Yesod 1061:Razor 912:Nevow 902:Flask 746:PyDev 666:Psyco 651:Numba 438:await 410:is a 407:scope 387:scope 345:await 333:await 327:event 309:scope 297:async 202:Draft 182:.html 99:JSTOR 85:books 54:, or 1904:Yaws 1898:Ruby 1806:Play 1801:Lift 1775:Rust 1750:Merb 1742:Ruby 1730:more 1684:Pyjs 1674:Grok 1561:MODX 1521:Grav 1511:Flow 1440:Perl 1360:htmx 1253:Seam 1243:Play 1200:Java 1185:Snap 1046:AJAX 1041:Core 1028:.NET 963:more 907:Grok 780:ASGI 775:WSGI 757:more 731:IDLE 726:eric 718:IDEs 697:more 671:PyPy 463:WSGI 459:WSGI 455:WSGI 427:send 424:and 413:dict 399:send 396:and 348:send 321:send 274:WSGI 266:WSGI 243:ASGI 237:The 168:asgi 71:news 1874:Tcl 1733:... 1626:Yii 1551:li₃ 1478:PHP 1233:JWt 1218:GWT 1108:C++ 1083:BFC 1078:DNN 1056:MVC 966:... 759:... 699:... 366:... 342:... 300:def 174:/en 172:.io 142:3.0 1926:: 1303:ZK 1126:Wt 541:. 402:. 390:, 369:}) 351:({ 339:() 324:): 50:, 1910:) 1906:( 1900:) 1896:- 1892:( 1886:) 1882:( 1876:) 1872:( 1866:) 1862:( 1856:) 1852:( 1323:/ 999:e 992:t 985:v 857:e 850:t 843:v 600:e 593:t 586:v 553:. 527:. 363:, 357:: 330:= 318:, 312:, 306:( 292:: 241:( 226:e 219:t 212:v 121:) 115:( 110:) 106:( 96:· 89:· 82:· 75:· 58:. 36:.

Index

general notability guideline
reliable secondary sources
independent
merged
redirected
deleted
"Asynchronous Server Gateway Interface"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
asgi.readthedocs.io/en/latest/specs/index.html
public domain
v
t
e
web servers
asynchronous
Python
Web Server Gateway Interface
WSGI
Python
WSGI
Hello, World!
Python
WSGI
WSGI
WSGI

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.