Litestar 2.0 | On the horizon

litestar-org

This post is meant for the r/Python community, and has been cross-posted here.

Greetings my friendly neighborhood Pythonistas, Pythonians, Pythoons, future Rustaceans! I am excited to bring you another update on our project after quite a long r/Python break due to Reddit meta-issues and internal hunkering down to churn out new features, bug fixes, and more.

NOTE: This is quite a lengthy post, as the last time we posted we were on Alpha 1 and we have since went through Alpha 7 and now are on Beta 4! TL;DR at the bottom.

Previous Posts:

Starlite renamed to Litestar

Previous Update (March 2023)

Introducing Polyfactory

TL;DR:

Recap

What’s Litestar?

Litestar is a versatile and incredibly efficient ASGI framework that emphasizes building APIs. Our aim is to deliver an excellent developer experience by offering ready-built solutions for everyday tasks such as ORM integration, caching, session management, key/value stores, OpenAPI-schema generation, interactive API docs, type safety, and much more.

Check out our documentation to learn more about Litestar’s features!

Whats New

Stable Release Imminent

We announced Litestar v2 at the beginning of this year, and we are wrapping up a few last many fixes and features before 2.0 stable is released. We will not be rushed into this however, so anything is possible! We want a great tool for developers to build great… well… tools, apps, and whatever other creative things you can imagine.

Pydantic recently launched v2!

pydantic = { version = “*”, optional = true }

Pydantic has now been made a completely optional dependency.

What???

This doesn’t change much for you as an end user. It is still 100% supported, but all internals relying on Pydantic have been moved to the incredible msgspec library.

If you are using Pydantic now, you can continue! However, if you want to try out attrs or msgspec you can do that too!

We love all of these packages, but as a framework we want to be as flexible as possible for our end users — offering up as many choices as we can while not greatly increasing our upkeep burden.

Also, in our testing, even with the incredible Rust-powered updates by the Pydantic team, msgspec is still faster in ser/de and validation.

Pydantic v2

We have upgraded to Pydantic v2

> TL;DR: More Choices. More Speed. No Losses. Pydantic v2!

New Features

msgspec is now supported everywhere!

Channels & Websockets

DTOs

  • The new DTO implementation is complete, giving you even more powerful tools to transform, parse and validate your data on the fly, without having to define separate models

SQLAlchemy

HTMX

And More:

Documentation

Our documentation continues to receives updates including some exciting new content:

  • A growing Tutorials section
  • As a side note, if you are interested in developing more tutorials via our documentation, YouTube videos, or other mediums please reach out!
  • A new Topics section to discuss non-framework specific things

What’s Next?

As stated above, we hope this will be the last beta release before the official 2.0 stable release.

  • Writing a migration guide for 1.x > 2.0
  • SAQ Contrib (Possibly post-2.0 launch)

Org Updates

Now, for something new!

We have enjoyed having many contributors join us on our journey so far, with 2.0b3 having 11 contributors (6 of which are new!) alone.

If you have hung around our Discord you might already now this, but we have some changes in our core maintainers

Sponsorships

We have enabled sponsorships for GitHub, OpenCollective, and the incredible polar.sh platform.

polar.sh allows us to tag issues with a badge, and if that particular issue is something you would like to see prioritized or done, you can pledge money towards it. It helps us gauge desire for certain features and prioritize work. Read more about polar.sh

New Members

We are also excited to announce the we have added three new members to the org!

As always, if you want to get involved or in touch, check out Litestar on GitHub or join our Discord! Keep your toes crossed for 2.0 to release soon.

Links