Starlette
Rationale
Starlette is the backend framework we use for our platform .
The main reasons why we chose it over other alternatives are the following:
- It is open source .
- It is a high-level framework that reduces cognitive complexity for developers by providing things like routes, responses, validations, etc.
- It is one of the most reliable Python backend frameworks out there.
- It fully supports async programming , which is critical for our application performance.
- It has full static typing support.
Alternatives
These alternatives were considered but not chosen for the following reasons:
Django
- Django was replaced by Starlette.
- It only supported synchronous backends.
- It supported DB models for SQL databases, which were useless for us as we use DynamoDBÂ .
- It supported templates for serving frontends, which were useless for us as we use a SPAÂ .
FastAPI
- FastAPIÂ uses Starlette underneath.
- 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
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 .
Last updated on