Skip to content

Commit fa7a875

Browse files
committed
added ASGI docs
1 parent 307744e commit fa7a875

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/src/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Welcome to Piccolo's documentation!
1313
piccolo/engines/index
1414
piccolo/migrations/index
1515
piccolo/authentication/index
16+
piccolo/asgi/index
1617
piccolo/features/index
1718
piccolo/playground/index
1819
piccolo/ecosystem/index

docs/src/piccolo/asgi/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _ASGI:
2+
3+
####
4+
ASGI
5+
####
6+
7+
Using Piccolo standalone is fine if you want to build a data science script,
8+
but often you'll want to build a web application around it.
9+
10+
`ASGI <https://asgi.readthedocs.io/en/latest/>`_ is a standardised way for
11+
async Python libraries to interoperate. It's the equivalent of WSGI in the
12+
synchronous world.
13+
14+
By using the ``piccolo asgi new`` command, Piccolo will scaffold an ASGI web
15+
app for you, which includes everything you need to get started.
16+
17+
Currently, `Starlette <https://www.starlette.io/>`_ is used as the routing framework, and is a great choice.
18+
19+
Other great ASGI routing frameworks exist, and may be supported in the future
20+
(`Quart <https://pgjones.gitlab.io/quart/>`_ ,
21+
`FastAPI <https://fastapi.tiangolo.com/>`_ ,
22+
`Sanic <https://sanic.readthedocs.io/en/latest/>`_ ,
23+
`Django <https://www.djangoproject.com/>`_ etc).
24+
25+
`Hypercorn <https://pgjones.gitlab.io/hypercorn/>`_ and
26+
`Uvicorn <https://www.uvicorn.org/>`_ are available as ASGI servers.
27+
`Daphne <https://github.com/django/daphne>`_ can't be used programatically so
28+
was omitted at this time.

0 commit comments

Comments
 (0)