News for hackers. Stuff that matters.
Re:Python's Type Checking Renaissance by manojlds on Tuesday January 26, 2021 @11:29AM (#25917708)
More specifically, Pydantic. It's great!
Re:Python's Type Checking Renaissance by mattanimation on Tuesday January 26, 2021 @01:33PM (#25919469)
FastAPI got me turned onto Pydantic, both are awesome!
Re:Python's Type Checking Renaissance by marliechiller on Wednesday January 27, 2021 @04:32AM (#25926091)
I use pydantic all over the place now. FastAPI was what introduced it to me. Its really nice to be able to take advantage of the autocompletion when utilizing pydantic models rather than a straight dictionary. Now, in a lot of instances I use the pydantic models instead of dictionaries as it feels more explicit
Re:Python's Type Checking Renaissance by avolcano on Tuesday January 26, 2021 @11:33AM (#25917761)
Ah, thanks, I hadn't realized that's the underlying library! Runtime validation of types is absolutely the largest missing feature from TypeScript, IMO, so Pydantic is really impressive to me.
Re:Python's Type Checking Renaissance by ensignavenger on Tuesday January 26, 2021 @11:48AM (#25917996)
Yes, I have been using Pydantic with my Django projects, and it is great!