#Pydantic
2 posts tagged Pydantic. All posts
dataclasses, attrs or Pydantic: picking a Python data class libraryThe same order model written with dataclasses, attrs and Pydantic: frozen objects, slots, defaults, validation, conversion and JSON, and when to use each.
Getting reliable JSON from an LLM: schemas, structured outputs and validationThree ways to get JSON out of Claude in Python: prompting, a forced tool call and the structured outputs beta, with Pydantic validation, retries and stop reasons.
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)