Pydantic
Python's de facto data-validation library — typed models that parse and validate JSON, env vars, and API payloads.
Definition
Pydantic uses Python type hints to declare data models that validate input at runtime, coerce types, and emit JSON schemas. It is the backbone of FastAPI and the canonical way to define structured outputs for LLMs (used by Instructor, Outlines, and the OpenAI structured-output mode). Pydantic v2 is significantly faster than v1.
When to use
See also
- JSON Schema — A JSON-based vocabulary for describing the shape, types, and constraints of JSON documents.
- Flask — Minimal Python web framework — the standard pick for small HTTP services, internal tools, and webhook receivers.