top | item 25917657

(no title)

avolcano | 5 years ago

I'm excited about Python's typing potential. I recently rewrote an API from TypeScript to Kotlin since I am fairly unhappy with the server-side TS ecosystem, but ran across https://github.com/tiangolo/fastapi when exploring options and really dig it - seems to be by _far_ the lowest-ceremony way to make an HTTP API with static types that integrate with parsing/validation (something TypeScript is still really bad at, unless you bring your own runtime typing libraries...).

discuss

order

manojlds|5 years ago

More specifically, Pydantic. It's great!

mattanimation|5 years ago

FastAPI got me turned onto Pydantic, both are awesome!

marliechiller|5 years ago

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

avolcano|5 years ago

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.

ensignavenger|5 years ago

Yes, I have been using Pydantic with my Django projects, and it is great!