Talk Python To Me cover image

#313: Automate your data exchange with Pydantic

Talk Python To Me

00:00

How to Use Pedantic in Web Development

Fast API is sort of the exchange layer for fast API which is one of the more popular API frameworks these days. You can do things like treat these models directly in your code, let it do the validation there and then if you need to return the whole object graph as a dictionary you can just say model dot dict right? And also model dot JSON and that will take it right out toJSON as a string yeah so it will turn a spring off that REST-based language. It's pretty powerful but something in V2 that we might look at to make even more powerful is customizing how you do this. Those include and exclude fields can do some pretty ridiculously crazy logic going recursively

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app