Skip to content

Commit b14b10d

Browse files
committed
updated the ASGI docs
1 parent 2208608 commit b14b10d

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Let Piccolo scaffold you an ASGI web app, using Piccolo as the ORM:
5757
piccolo asgi new
5858
```
5959

60+
[Starlette](https://www.starlette.io/) and [FastAPI](https://fastapi.tiangolo.com/) are currently supported.
61+
6062
## Documentation
6163

6264
See [Read the docs](https://piccolo-orm.readthedocs.io/en/latest/piccolo/getting_started/index.html).

docs/src/piccolo/asgi/index.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,29 @@ async Python libraries to interoperate. It's the equivalent of WSGI in the
1212
synchronous world.
1313

1414
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.
15+
app for you, which includes everything you need to get started. The command
16+
will ask for your preferences on which libraries to use.
1617

17-
Currently, `Starlette <https://www.starlette.io/>`_ is used as the routing framework, and is a great choice.
18+
Routing frameworks
19+
******************
20+
21+
Currently, `Starlette <https://www.starlette.io/>`_ and `FastAPI <https://fastapi.tiangolo.com/>`_
22+
are supported.
1823

1924
Other great ASGI routing frameworks exist, and may be supported in the future
2025
(`Quart <https://pgjones.gitlab.io/quart/>`_ ,
21-
`FastAPI <https://fastapi.tiangolo.com/>`_ ,
2226
`Sanic <https://sanic.readthedocs.io/en/latest/>`_ ,
2327
`Django <https://www.djangoproject.com/>`_ etc).
2428

29+
Which to use?
30+
=============
31+
32+
Both are great choices. FastAPI is built on top of Starlette, so they're
33+
very similar. FastAPI is useful if you want to document a REST API.
34+
35+
Web servers
36+
************
37+
2538
`Hypercorn <https://pgjones.gitlab.io/hypercorn/>`_ and
2639
`Uvicorn <https://www.uvicorn.org/>`_ are available as ASGI servers.
2740
`Daphne <https://github.com/django/daphne>`_ can't be used programatically so

0 commit comments

Comments
 (0)