tags:
- python
- pydantic
permalink: what-is-pydantic
title: What is Pydantic?
Pydantic is a data validation library for Python. It allows you create classes whose properties adhere to specific data types, and provides type hints.
Use TypedDict
when you want to enforce a specific dictionary structure during development and static type checking is sufficient for your needs.
Use Pydantic when you need strong runtime validation, type coercion, and extra features like default values and validators, especially in scenarios like API development or data parsing.