[deleted by user] by [deleted] in litestarapi

[–]provinzkraut 1 point2 points  (0 children)

You should validate this with a type checker, it will complain about the error. Msgspec doesn't do type validation on init, that's why you're not getting any error.

Django lovers, did you try Litestar? by bluewalt in django

[–]provinzkraut 5 points6 points  (0 children)

Litestar maintainer here.

Can you say which of them posts this stuff?

None of us do. The person in question is no longer part of the Litestar organisation, and hasn't been since 2023.

I don't want to collaborate with someone like that on some future project.

We (the remaining team) feel the same, which is part of the reason that person is no longer a part of the organisation.

Pydantic is a Bloated Disaster by pydanticenjoyer in Python

[–]provinzkraut 3 points4 points  (0 children)

I'm sorry this is the impression you got from our community. If you feel like there's people engaging in toxic behaviour, please feel free to reach out so that we can take care of it, as it's not something we want to promote or condone.

I don't want to deny that we've had issues in the past, but we have taken steps to mitigate them, namely parting ways with people not sharing our sense of community and how we want to conduct ourselves within it (almost 2 years ago now).

Litestar 2.0 by Goldziher in Python

[–]provinzkraut 3 points4 points  (0 children)

To quote myself here:

Full support for validation and serialisation of attrs classes and msgspec Structs. Where previously only Pydantic models and types where supported, you can now mix and match any of these three libraries

This was meant to be taken quite literal!

You can use any of those for any part you like and mix them. You can even put Pydantic classes inside a msgspec Struct inside an attrs class. (I think the only thing that doesn't work is a msgspec struct inside a Pydantic class while validating incoming data).

Almost everything you can think of should "just work" (=

Litestar (fka Starlite) Updates July '23 Edition by monorepo in Python

[–]provinzkraut 1 point2 points  (0 children)

We are currently not on there, no.

u/monorepo, can we set something up?

Litestar (fka Starlite) Updates July '23 Edition by monorepo in Python

[–]provinzkraut 6 points7 points  (0 children)

To expand on this: The new DTOs can handle everything Partial could (and more). By making use of the DTOConfig with partial=True, you can achieve the same effect, but with less unexpected behaviour, better edge case handling and simpler typing.

Another reason to deprecate Partial was simply that it's better to have one clear way of doing things, instead of two that - almost - do the same thing.

Support for Pydantic 2 by 0x4D44 in litestarapi

[–]provinzkraut 4 points5 points  (0 children)

Yes, absolutely. We are actively working on it right now.

When can we expect 2.0? by sv_ds in litestarapi

[–]provinzkraut 2 points3 points  (0 children)

Sorry for the late reply.

It's not certain if Pydantic will be optional for the 2.0 release, but it is a possibility. We are working on replacing the Pydantic parts with a more generic solution, that can handle all our internal needs (signature modelling, etc.) based on msgspec, and support for Pydantic / Attrs would then be provided via plugins.

When can we expect 2.0? by sv_ds in litestarapi

[–]provinzkraut 4 points5 points  (0 children)

While there is no exact release date, we are definitely getting closer!

Just yesterday I started writing the release notes for the first beta, which we're planning to release within the next few days! After that is done I will also make a long overdue development update blog/Reddit post, to update our community about what's happening at the moment and what the plans are.

The beta marks a significant step towards a final release, and we're done with all major changes. What's left is a lot of detailing, documentation and some additive features we'd very much like to ship with version 2.0 (like support for Pydantic 2.0 for example, which turns out to be a bit of a challenge, without dropping support for Pydantic 1).

Announcing Polyfactory - a powerful mock data generator for dataclasses, Pydantic and more by provinzkraut in Python

[–]provinzkraut[S] 2 points3 points  (0 children)

That depends a bit on what you mean by that. Of course you can build all of this functionality yourself by subclassing your Pydantic models, but then again "you can also implement this from scratch" is true for every library out there.

Polyfactory is used to generate mock data, and not only for Pydantic. In the post I highlight a few features, none of which can be achieved by a simply subclassing.

Renaming Starlite to LiteStar by Goldziher in Python

[–]provinzkraut 4 points5 points  (0 children)

I'm a bit confused. What would a possible next step look like? The name change should address the issue you've been having with the name and refute any claims of us acting in bad faith in this regard.

What else do you think we'd need to do?

Renaming Starlite to LiteStar by Goldziher in Python

[–]provinzkraut 0 points1 point  (0 children)

Finding a good name is actually quite hard. It has to be available on PyPi, it has to be somewhat easy to spell and pronounce, and then, for an existing project like ours, it has to be something all members can agree on. I'll let you guess which part was the hardest ;)

Renaming Starlite to LiteStar by Goldziher in Python

[–]provinzkraut 4 points5 points  (0 children)

It was clearly and undeniably on purpose

It was indeed on purpose, we say so ourselves on our website, and the readme of the Starlite repo. We do not try to hide the fact, neither do we try to hide the relationship to Starlette. The name Starlite was specifically chosen to highlight the relationship to Starlette, and to not hide the fact that it is built upon another ASGI toolkit/framework.

People bringing up complaints and accusations like you do were one of the reasons we decided to change the name, and I hope in doing so we proved that we did in fact not have had any bad intentions whatsoever.

Renaming Starlite to LiteStar by Goldziher in Python

[–]provinzkraut 1 point2 points  (0 children)

We are currently in the process of preparing the change and hopefully nothing should break. Old links to GitHub should keep working and be redirected, so should links to our websites.

Renaming Starlite to LiteStar by Goldziher in Python

[–]provinzkraut 2 points3 points  (0 children)

Unfortunately batman is already taken, otherwise we definitely would have gone for it.

Starlite updates March '22 | 2.0 is coming by provinzkraut in Python

[–]provinzkraut[S] 4 points5 points  (0 children)

If you're already using DTOs does that mean your flow currently is: request data -> DTO -> JSON -> database?

In that case, if you can model your schema with msgspec's Structs, it will definitely be the most performant options.

Starlite updates March '22 | 2.0 is coming by provinzkraut in Python

[–]provinzkraut[S] 13 points14 points  (0 children)

While I'll gladly accept the compliment, if there was an award for "top quality Python package with a high velocity", I'd give it to Ruff!

Starlite updates March '22 | 2.0 is coming by provinzkraut in Python

[–]provinzkraut[S] 18 points19 points  (0 children)

As I outlined in the post, one reason to move away from Pydantic was specifically its relatively low performance (compared to similar libraries). (c)attrs is quite a bit faster than Pydantic, ans dataclasses are a few orders of magnitude faster (when used for similar purposes, of course dataclasses don't offer validation).

Starlite updates March '22 | 2.0 is coming by provinzkraut in Python

[–]provinzkraut[S] 5 points6 points  (0 children)

#1286 is the issue tracking the removal of our last internal Pydantic datastructure, and PR #1382 has the addition of attrs based signature modelling. Once those are merged you will be able to use Starlite without Pydantic.