Starlite December '22 Updates
Tags: starlite, webdev, python, api
Published: 2022-12-11 13:31:27

# Starlite December '22 Updates

Hi Pythonistas!

This post is an update on the development status of [Starlite](https://github.com/starlite-api/starlite). Let me start, as usual, with a short intro about what is [Starlite](https://github.com/starlite-api/starlite) - for those of you unfamiliar with it. 

[Starlite](https://github.com/starlite-api/starlite) is a Python ASGI API framework. ASGI is an async python API specification, originally from the good folk over at the Django project, and an ASGI API framework is a framework that follows this specification. You might be familiar with other ASGI frameworks, with the most famous one these days being FastAPI. 

[Starlite](https://github.com/starlite-api/starlite) began as an alternative to FastAPI - it was originally built on the same foundation- Starlette, which offers a ready to use ASGI "tool-kit". The name of the framework - Starlite, was meant to highlight this relationship. Yet, over time Starlite grew in sophistication and complextiy, and we made the decision to drop Starlette as a dependency because this no longer made any sense. 

## Dropping Starlette and Benchmarks

Since version `v1.39.0` Starlite (released on the 12.11.22) no longer has any dependency on Starlette. Between this version and `v1.45.0` that was released today (11.12.22), we have invested significant effort into benchmarking and optimizing code. One of our maintainers, @provinzkraut (Janek Nouvertné), has done amazing work rewriting our benchmarking framework. You can read more about this in [here](https://starlite-api.github.io/starlite/benchmarks/) and run the benchmarks on your own by cloning [the benchmark repository](https://github.com/starlite-api/api-performance-tests). The results are pretty impressive if I may say so myself:

![Response Cookies and Headers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lil7femi9ph9d1gw96y5.png)


![File Download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrxzx5kga9vwng4903i1.png)


![JSON Response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/up0r3smiashxlbgz1t96.png)


![Query and Path Parameters](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vkwv17fr0sirkhx7ik1.png)


![Plaintext Response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/109capw1z7f95w0071kv.png)


![URLEncoded and Multipart](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dkjsy8xvftfrw6xdfun.png)


![JSON Post Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4az9ozzhp5sv635arx68.png)


![Pydantic and Dataclass Serialization](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5atv1md5y9nls2jhbdz.png)

## Other Important Changes

### Contrib and Security Backends

Another important development is the inclusion of a `starlite.contrib` namespace, which we will be expanding on in the future. 

This namespace includes an optional [OpenTelemetry Integration](https://starlite-api.github.io/starlite/usage/18-contrib/0-open-telemetry/), which was a long awaited feature.

We also added [Security Backend](https://starlite-api.github.io/starlite/usage/8-security/0-intro/) support, which was discussed in some length [here](https://github.com/starlite-api/starlite/discussions/794). The new security backend supports all of the different [session backends](https://starlite-api.github.io/starlite/usage/8-security/2-security-backends/) Starlite supports, and there is also an optional [JWT Security Backend](https://starlite-api.github.io/starlite/usage/18-contrib/1-jwt/) as part of contrib.

### Yield Based Dependencies

We made some updates to dependencies following a request on reddit - we now support yield based dependencies in the Starlite [Dependency Injection](https://starlite-api.github.io/starlite/usage/6-dependency-injection/0-dependency-injection-intro/) framework. Additionally we made some optimizations to dependency injection which allows us to resolve dependencies in parallel and do some caching, the result is a significant boost in speed.


![Dependency Injection Performance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pk3kq7r1i5pn8xvtabcg.png)

## Call for Contributiors and Maintainers

The original imperative for creating [Starlite](https://github.com/starlite-api/starlite) was to create a community driven alternative to FastAPI. This was and remains a core pillar of Starlite- to have multiple maintainers and be as open, inviting and accessible for contributions as feasible. The project follows the [all-contributors specification](https://allcontributors.org/docs/en/specification) and we attribute all types of contribution - code, testing, refactoring, code reviews, documentation, design of the docs, writing and evangelizing etc.

We are a growing group of contributors and maintainers (5 maintainers at present), and we are always looking for more people to be involved. You're invited to join us on our [discord server](https://discord.gg/X3FJqy8d2j), or checkout our [GitHub repository](https://github.com/starlite-api/starlite) where you are welcome to write in both discussions and issues.