ASGI

Using Piccolo standalone is fine if you want to build a data science script, but often you’ll want to build a web application around it.

ASGI is a standardised way for async Python libraries to interoperate. It’s the equivalent of WSGI in the synchronous world.

By using the piccolo asgi new command, Piccolo will scaffold an ASGI web app for you, which includes everything you need to get started. The command will ask for your preferences on which libraries to use.

Routing frameworks

Currently, Starlette, FastAPI, and BlackSheep are supported.

Other great ASGI routing frameworks exist, and may be supported in the future (Quart , Sanic , Django etc).

Which to use?

All are great choices. FastAPI is built on top of Starlette, so they’re very similar. FastAPI is useful if you want to document a REST API.

Web servers

Hypercorn and Uvicorn are available as ASGI servers. Daphne can’t be used programatically so was omitted at this time.