pydantic
« Back to VersTracker
Description:
Data validation using Python type hints
Type: Formula  |  Latest Version: 2.12.5@0  |  Tracked Since: Nov 26, 2025
Links: Homepage  |  @pydantic  |  formulae.brew.sh
Category: Developer tools
Tags: python validation json data-modeling type-hints
Install: brew install pydantic
About:
Pydantic is a Python data validation library that uses Python type hints to define data models. It enforces type hints at runtime, provides clear error messages when validation fails, and serializes data into various formats like JSON. Its core value is reducing boilerplate code for data parsing and validation, making it essential for building reliable APIs and data pipelines.
Key Features:
  • Type-safe data validation using standard Python type hints
  • Automatic data parsing and serialization (e.g., JSON, dict)
  • Detailed, user-friendly error reporting
  • High performance via Rust-based core (Pydantic V2)
  • Extensible via custom validators and data types
Use Cases:
  • Validating and parsing API request/response payloads (e.g., in FastAPI)
  • Managing application configuration settings
  • Structuring and cleaning data for data science and ML pipelines
Alternatives:
  • attrs – attrs is a library for creating class boilerplate, often paired with cattrs for serialization, whereas Pydantic bundles validation and serialization into one package using type hints.
  • Marshmallow – Marshmallow is an older ORM/ODM-agnostic library that requires explicit field definitions, while Pydantic leverages Python's native type hints for a more concise syntax.
Version History
Detected Version Rev Change Commit
Nov 26, 2025 11:26pm 0 VERSION_BUMP d283461b
Nov 6, 2025 5:23pm 0 NEW c0b3b7d9