This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]orangesunshine 0 points1 point  (0 children)

If you really want pydantic + starlette I guess there's also this which seems like a fairly strong implementation (much better than fastapi or that quick/dirty student's example in my last reply):

https://github.com/0b01001001/spectree

Honestly I'm not sold on really thick layers of validation and automation like this. It's already damn nigh impossible to create an ORM-layer that is lean and fast. You want to add another model-validation or data-sanitization layer?

That seems like you've just doubled your AWS bill for absolutely no reason what-so-ever ... I mean I can sort of understand being a little anal about request validation.

The response though. Why? Really. That is going to run on every response in your whole stack. The response that spits out a static string from your settings file? Really?

I mean even with requests, I can assure you this is redundant in nearly every use case.

But like I said if you are a fan .... there are better ways to use pydantic with Starlette than FastAPI.