Contribute Media
A thank you to everyone who makes this possible: Read More

Intro to Pydantic, run-time type checking for your dataclasses

Description

Want static type checking in run time? Want to use standard python type annotations? Want compatibility with standard python dataclasses? Then it sounds like pydantic is something for you. Pydantic offers a pythonic way to validate your user data using run-time enforced standard type-annotations.

This talk focuses on how Pydantic can be used with web APIs to simplify many parts regarding user input validation. I’ve previously back in early 2018 built a similar solution to Pydantic based upon standard dataclasses for a large B2B SaaS application built with flask. When I left that project I was briefly considered rebuilding it as open-source but while doing my research I discovered Pydantic’s powers which I had put in my keep tabs on the list when it was in a much earlier stage, but at this point, it had evolved to a polished library and a perfect companion for JSON-based APIs.

Slides: https://slides.com/hultner/pycon-us-2021

Details

Improve this page