Starlette | Stack | Fluid Attacks Help

Starlette

Rationale

Starlette is the backend framework we use for our Platform.

The main reasons why we chose it over other alternatives are:

  1. It is Open source.
  2. It is a high-level framework that reduces cognitive complexity for developers by providing things like routes, responses, validations, etc.
  3. It is one of the most reliable Python backend frameworks out there.
  4. It fully supports async programming, which is critical for our application performance.
  5. It has full static typing support.

Alternatives

The following alternatives were considered but not chosen for the following reasons:

Django

  1. Django was replaced by Starlette.
  2. It only supported synchronous backends.
  3. It supported DB models for SQL databases, which were useless for us as we use DynamoDB.
  4. It supported templates for serving frontends, which were useless for us as we use a SPA.

FastAPI

  1. FastAPI uses Starlette underneath.
  2. Its main value comes from its endpoint validations and API documentation autogeneration. Such features are only available for REST APIs. This is not important to us as we use GraphQL.

Falcon

  1. Falcon had a low-level approach compared to Starlette, meaning that cognitive complexity for developers was higher.

Usage

We use Starlette as the backend framework for our Platform.