{"slug": "pydantic", "name": "Pydantic", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "Python data validation library that uses type hints to define and enforce schemas.", "recommenders": 8, "commenters": 11, "warners": 0, "score": 7.607, "rising": 0.04, "first": "2025-11-14", "latest": "2026-08-29", "why": "Liked for validating LLM structured output, catching malformed JSON for retries with helpful error messages, and for typed data models and DTOs in larger Python codebases.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 8, "neutral": 2, "compare": 1, "warn": 0}, "spark": [2, 2, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0], "listed": true, "loved": ["LLM output validation", "Typed data models"], "caveat": "Ty support", "short_quote": "you can add complex pydantic validators (or whatever, I use pydantic) with super helpful error messages", "icon": true, "domain": null, "github_repo": null, "official_url": "https://docs.pydantic.dev", "pricing": "open source", "aliases": ["Pydantic", "pydantic"], "verdict": [{"text": "Liked for validating LLM structured output, catching malformed JSON for retries with helpful error messages,", "cites": [{"id": 739303809, "item_id": 46206488, "url": "https://news.ycombinator.com/item?id=46206488", "by": "arizen", "date": "2025-12-09", "stance": "recommend", "quote": "We wrap tool calls in strict Pydantic schemas to catch and retry malformed JSON", "excerpt": "Hi HN, I wanted to share a reference implementation I architected for moving AI Agents from local prototypes to production services. The Context: It is relatively easy to get an agent working on a local machine where you can watch the terminal output and restart it if it gets stuck. However, the architecture often breaks down when moving to a headless, hosted environment where the agent needs to handle loops, persist", "context": "", "use_case": "validating LLM tool calls", "switched_from": "", "story": "Show HN: Open-source reference architecture for AI Agents (LangGraph, Pydantic)"}, {"id": 734951072, "item_id": 45934442, "url": "https://news.ycombinator.com/item?id=45934442", "by": "mulmboy", "date": "2025-11-14", "stance": "recommend", "quote": "you can add complex pydantic validators (or whatever, I use pydantic) with super helpful error messages", "excerpt": "Along with a bunch of limitations that make it useless for anything but trivial use cases https://docs.claude.com/en/docs/build-with-claude/structured-outputs#not-supported I've found structured output APIs to be a pain across various LLMs. Now I just ask for json output and pick it out between first/last curly brace. If validation fails just retry with details about why it was invalid. This works very reliably for c", "context": "", "use_case": "validating LLM JSON output", "switched_from": "", "story": "Structured outputs on the Claude Developer Platform"}, {"id": 786973990, "item_id": 49185874, "url": "https://news.ycombinator.com/item?id=49185874", "by": "Gayithri2026", "date": "2026-08-05", "stance": "recommend", "quote": "an explicit enough_context flag via Instructor + Pydantic", "excerpt": "Location: San Jose, CA (SF Bay Area) Remote: Yes Willing to relocate: No Technologies: Python, FastAPI, PostgreSQL/pgvector, RAG, LangChain, PydanticAI, Celery, Redis, Docker, AWS, Langfuse, Java, Spring Boot R\u00e9sum\u00e9/CV: https://github.com/Gayithri606/resume/blob/main/GayithriPonnapalli-Resume.pdf Email: gayithri@pojoai.com AI engineer building RAG chatbots and AI-driven workflow automation. Five years of production J", "context": "AI engineer building RAG chatbots", "use_case": "structured validation", "switched_from": "", "story": "Ask HN: Who wants to be hired? (August 2026)"}]}, {"text": " and for typed data models and DTOs in larger Python codebases.", "cites": [{"id": 764051938, "item_id": 47753246, "url": "https://news.ycombinator.com/item?id=47753246", "by": "vanflymen", "date": "2026-04-13", "stance": "recommend", "quote": "push all ORM work into repositories that return Pydantic DTOs", "excerpt": "I've been building in Django for a long time and I love the framework, but some things have always bugged me: - Typing is exceptionally painful...and getting proper type safety across a Django project is a fight - the ORM leaks throughout your project: it's easy to chain ORM methods in a view, a serializer, a template tag, a Celery task, etc and N+1s end up being difficult to find - models become god objects: custom ", "context": "", "use_case": "typed DTOs", "switched_from": "", "story": "Show HN: 15 yrs of Django in prod: patterns I keep using (agent skills)"}, {"id": 740736450, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "recommend", "quote": "We use Pydantic heavily", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "data validation", "switched_from": "", "story": "Announcing the Beta release of ty"}]}, {"text": " It suits Python developers who validate LLM output, scraped data, or JSON passed between services,", "cites": [{"id": 755731670, "item_id": 47233229, "url": "https://news.ycombinator.com/item?id=47233229", "by": "iranu", "date": "2026-03-03", "stance": "neutral", "quote": "JSON goes through Pydantic validation before it touches the database.", "excerpt": "Hi HN, I built this. It's been in production across 500+ websites. We're a research group that studies online communications. We needed to scrape hundreds of sites regularly \u2014 news, blogs, forums, policy orgs \u2014 and maintain all those scrapers. At 10 sites, individual scrapers were fine. At 200+ we were spending more time fixing broken scrapers than doing actual work. Every redesign broke something, every new site mea", "context": "", "use_case": "validating configs", "switched_from": "", "story": "Show HN: ScrapAI \u2013 We scrape 500 sites. AI runs once per site, not per page"}, {"id": 789268242, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in Python", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}]}, {"text": " though one commenter was still waiting for first-class support in the Ty type checker.", "cites": [{"id": 740736450, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "recommend", "quote": "We use Pydantic heavily", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "data validation", "switched_from": "", "story": "Announcing the Beta release of ty"}]}], "praise": [{"label": "LLM output validation", "summary": "Strict schemas catch malformed JSON from LLMs and give clear errors to retry with.", "quotes": [{"id": 739303809, "item_id": 46206488, "url": "https://news.ycombinator.com/item?id=46206488", "by": "arizen", "date": "2025-12-09", "stance": "recommend", "quote": "We wrap tool calls in strict Pydantic schemas to catch and retry malformed JSON", "excerpt": "Hi HN, I wanted to share a reference implementation I architected for moving AI Agents from local prototypes to production services. The Context: It is relatively easy to get an agent working on a local machine where you can watch the terminal output and restart it if it gets stuck. However, the architecture often breaks down when moving to a headless, hosted environment where the agent needs to handle loops, persist", "context": "", "use_case": "validating LLM tool calls", "switched_from": "", "story": "Show HN: Open-source reference architecture for AI Agents (LangGraph, Pydantic)"}, {"id": 734951072, "item_id": 45934442, "url": "https://news.ycombinator.com/item?id=45934442", "by": "mulmboy", "date": "2025-11-14", "stance": "recommend", "quote": "you can add complex pydantic validators (or whatever, I use pydantic) with super helpful error messages", "excerpt": "Along with a bunch of limitations that make it useless for anything but trivial use cases https://docs.claude.com/en/docs/build-with-claude/structured-outputs#not-supported I've found structured output APIs to be a pain across various LLMs. Now I just ask for json output and pick it out between first/last curly brace. If validation fails just retry with details about why it was invalid. This works very reliably for c", "context": "", "use_case": "validating LLM JSON output", "switched_from": "", "story": "Structured outputs on the Claude Developer Platform"}, {"id": 786973990, "item_id": 49185874, "url": "https://news.ycombinator.com/item?id=49185874", "by": "Gayithri2026", "date": "2026-08-05", "stance": "recommend", "quote": "an explicit enough_context flag via Instructor + Pydantic", "excerpt": "Location: San Jose, CA (SF Bay Area) Remote: Yes Willing to relocate: No Technologies: Python, FastAPI, PostgreSQL/pgvector, RAG, LangChain, PydanticAI, Celery, Redis, Docker, AWS, Langfuse, Java, Spring Boot R\u00e9sum\u00e9/CV: https://github.com/Gayithri606/resume/blob/main/GayithriPonnapalli-Resume.pdf Email: gayithri@pojoai.com AI engineer building RAG chatbots and AI-driven workflow automation. Five years of production J", "context": "AI engineer building RAG chatbots", "use_case": "structured validation", "switched_from": "", "story": "Ask HN: Who wants to be hired? (August 2026)"}]}, {"label": "Typed data models", "summary": "Used as DTOs and typed models to bring type safety to larger Python projects.", "quotes": [{"id": 764051938, "item_id": 47753246, "url": "https://news.ycombinator.com/item?id=47753246", "by": "vanflymen", "date": "2026-04-13", "stance": "recommend", "quote": "push all ORM work into repositories that return Pydantic DTOs", "excerpt": "I've been building in Django for a long time and I love the framework, but some things have always bugged me: - Typing is exceptionally painful...and getting proper type safety across a Django project is a fight - the ORM leaks throughout your project: it's easy to chain ORM methods in a view, a serializer, a template tag, a Celery task, etc and N+1s end up being difficult to find - models become god objects: custom ", "context": "", "use_case": "typed DTOs", "switched_from": "", "story": "Show HN: 15 yrs of Django in prod: patterns I keep using (agent skills)"}, {"id": 740736450, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "recommend", "quote": "We use Pydantic heavily", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "data validation", "switched_from": "", "story": "Announcing the Beta release of ty"}]}, {"label": "API design", "summary": "Credited with influential API design and with advancing the Python ecosystem.", "quotes": [{"id": 758982610, "item_id": 47436413, "url": "https://news.ycombinator.com/item?id=47436413", "by": "retep_kram", "date": "2026-03-19", "stance": "recommend", "quote": "the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested", "excerpt": "One of those instances of AI-generated code replicating another library's API, using a more low-level language for the core implementation. I love the idea of using new low-level languages and making libraries faster. But I wonder if there is a better way to recognize and value the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested in to make those libraries. Without the API", "context": "", "use_case": "data validation", "switched_from": "", "story": "FastAPI-compatible Python framework with Zig HTTP core; 7x faster"}, {"id": 737627221, "item_id": 46101701, "url": "https://news.ycombinator.com/item?id=46101701", "by": "bbor", "date": "2025-11-30", "stance": "recommend", "quote": "I see Astral and Pydantic as a league of their own in terms of advancing Python", "excerpt": "Over the past few months, I've switched a few decently-sized python codebases from MyPy (which I used for years) to PyreFly (because the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point), and finally to Ty after it left beta this week. I'm now running a fully Astral-ized (rust-ized!) setup: 1. packaging with uv (instead of pip or poetry), 2. type checking with ty (instead of the default ", "context": "", "use_case": "", "switched_from": "", "story": "Ty \u2013 A fast Python type checker, written in Rust"}]}, {"label": "Data validation", "summary": "Validates JSON before it reaches the database and fits well with JSON Schema across stacks.", "quotes": [{"id": 755731670, "item_id": 47233229, "url": "https://news.ycombinator.com/item?id=47233229", "by": "iranu", "date": "2026-03-03", "stance": "neutral", "quote": "JSON goes through Pydantic validation before it touches the database.", "excerpt": "Hi HN, I built this. It's been in production across 500+ websites. We're a research group that studies online communications. We needed to scrape hundreds of sites regularly \u2014 news, blogs, forums, policy orgs \u2014 and maintain all those scrapers. At 10 sites, individual scrapers were fine. At 200+ we were spending more time fixing broken scrapers than doing actual work. Every redesign broke something, every new site mea", "context": "", "use_case": "validating configs", "switched_from": "", "story": "Show HN: ScrapAI \u2013 We scrape 500 sites. AI runs once per site, not per page"}, {"id": 789268242, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in Python", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}]}, {"label": "Fast iteration", "summary": "Changing validators is a quick edit and rerun, with no compile step.", "quotes": [{"id": 769663089, "item_id": 48103943, "url": "https://news.ycombinator.com/item?id=48103943", "by": "maxdo", "date": "2026-05-11", "stance": "neutral", "quote": "With Python or JS, this is a pydantic edit + run.", "excerpt": "Despite lots of influencers (Karpathy) I personally trust, the industry is taking the opposite turn for a reason: https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool Also Claude Cowork, etc. 1. You don't need compilation... run and test faster. Compilers were primarily built to prevent human error, and only very secondarily to guard your business logic. 2. Your validators quite often nee", "context": "", "use_case": "validators", "switched_from": "", "story": "If AI Writes Your Code, Why Use Python?"}]}, {"label": "Readability", "summary": "Seen as more restrained and readable than Zod.", "quotes": [{"id": 791899281, "item_id": 49493705, "url": "https://news.ycombinator.com/item?id=49493705", "by": "_the_inflator", "date": "2026-08-29", "stance": "compare", "quote": "Even Pydantic looks tamed compared to Zod.", "excerpt": "Serious question: how widespread and actually used in production is Zod? Honestly, it made things worse for me. JavaScript isn\u2019t a statistical typed language and TypeScript already is something, where due to compiler issues I just use \u201cany\u201d. Zod has its conventions and JavaScript ain\u2019t Java. So Zod is also hard to read and debug. It is type conversion to type conversion - bloat, not JavaScript. Even Pydantic looks ta", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}]}], "caveats": [{"label": "Ty support", "summary": "First-class support in the Ty type checker was still pending at the time.", "quotes": [{"id": 740736450, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "recommend", "quote": "We use Pydantic heavily", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "data validation", "switched_from": "", "story": "Announcing the Beta release of ty"}]}], "who": [{"by": "Gayithri2026", "context": "AI engineer building RAG chatbots", "url": "https://news.ycombinator.com/item?id=49185874", "date": "2026-08-05"}, {"by": "shrumm", "context": "uses Pydantic heavily on large Python codebase", "url": "https://news.ycombinator.com/item?id=46296028", "date": "2025-12-16"}], "tags": ["for LLM apps", "for Python developers", "for large codebases", "for JSON validation"], "use_cases": ["data validation", "schema validation", "schema validation in python", "structured validation", "validators", "typed dtos"], "compared": [{"slug": "zod", "name": "Zod", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "fastapi", "name": "FastAPI", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "mypy", "name": "mypy", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "claude", "name": "Claude", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "celery", "name": "Celery", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "ty", "name": "ty", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49493018", "title": "Zod v4.5 adds schema compilation (3-9x faster validation)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49322573", "title": "Protobuf has LSP support. You're welcome", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49156682", "title": "Ask HN: Who wants to be hired? (August 2026)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48100433", "title": "If AI Writes Your Code, Why Use Python?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47753245", "title": "Show HN: 15 yrs of Django in prod: patterns I keep using (agent skills)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47431994", "title": "FastAPI-compatible Python framework with Zig HTTP core; 7x faster", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 2}, "2025-12": {"recommend": 2}, "2026-01": {}, "2026-02": {}, "2026-03": {"neutral": 1, "recommend": 1}, "2026-04": {"recommend": 1}, "2026-05": {"neutral": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {"recommend": 2, "compare": 1}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 791899281, "item_id": 49493705, "url": "https://news.ycombinator.com/item?id=49493705", "by": "_the_inflator", "date": "2026-08-29", "stance": "compare", "quote": "Even Pydantic looks tamed compared to Zod.", "excerpt": "Serious question: how widespread and actually used in production is Zod? Honestly, it made things worse for me. JavaScript isn\u2019t a statistical typed language and TypeScript already is something, where due to compiler issues I just use \u201cany\u201d. Zod has its conventions and JavaScript ain\u2019t Java. So Zod is also hard to read and debug. It is type conversion to type conversion - bloat, not JavaScript. Even Pydantic looks ta", "context": "", "use_case": "schema validation", "switched_from": "", "story": "Zod v4.5 adds schema compilation (3-9x faster validation)"}, {"id": 789268242, "item_id": 49329265, "url": "https://news.ycombinator.com/item?id=49329265", "by": "PufPufPuf", "date": "2026-08-17", "stance": "recommend", "quote": "the support for JSON Schema is much better across the stacks I use, e.g. Zod in JS/TS, Pydantic in Python", "excerpt": "The promise of Protobuf/gRPC for seamless communication across tech stacks just wasn't delivered. Third party projects like Buf or BetterProto for Python try their best but it's still a nightmare trying to integrate with gRPC from something remotely modern, like Python with uv and async/await. Plus there's a lot of little pains like not being human-readable, always requiring HTTP/2 and thus HTTPS, and so on. JSON isn", "context": "", "use_case": "schema validation in Python", "switched_from": "", "story": "Protobuf has LSP support. You're welcome"}, {"id": 786973990, "item_id": 49185874, "url": "https://news.ycombinator.com/item?id=49185874", "by": "Gayithri2026", "date": "2026-08-05", "stance": "recommend", "quote": "an explicit enough_context flag via Instructor + Pydantic", "excerpt": "Location: San Jose, CA (SF Bay Area) Remote: Yes Willing to relocate: No Technologies: Python, FastAPI, PostgreSQL/pgvector, RAG, LangChain, PydanticAI, Celery, Redis, Docker, AWS, Langfuse, Java, Spring Boot R\u00e9sum\u00e9/CV: https://github.com/Gayithri606/resume/blob/main/GayithriPonnapalli-Resume.pdf Email: gayithri@pojoai.com AI engineer building RAG chatbots and AI-driven workflow automation. Five years of production J", "context": "AI engineer building RAG chatbots", "use_case": "structured validation", "switched_from": "", "story": "Ask HN: Who wants to be hired? (August 2026)"}, {"id": 769663089, "item_id": 48103943, "url": "https://news.ycombinator.com/item?id=48103943", "by": "maxdo", "date": "2026-05-11", "stance": "neutral", "quote": "With Python or JS, this is a pydantic edit + run.", "excerpt": "Despite lots of influencers (Karpathy) I personally trust, the industry is taking the opposite turn for a reason: https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool Also Claude Cowork, etc. 1. You don't need compilation... run and test faster. Compilers were primarily built to prevent human error, and only very secondarily to guard your business logic. 2. Your validators quite often nee", "context": "", "use_case": "validators", "switched_from": "", "story": "If AI Writes Your Code, Why Use Python?"}, {"id": 764051938, "item_id": 47753246, "url": "https://news.ycombinator.com/item?id=47753246", "by": "vanflymen", "date": "2026-04-13", "stance": "recommend", "quote": "push all ORM work into repositories that return Pydantic DTOs", "excerpt": "I've been building in Django for a long time and I love the framework, but some things have always bugged me: - Typing is exceptionally painful...and getting proper type safety across a Django project is a fight - the ORM leaks throughout your project: it's easy to chain ORM methods in a view, a serializer, a template tag, a Celery task, etc and N+1s end up being difficult to find - models become god objects: custom ", "context": "", "use_case": "typed DTOs", "switched_from": "", "story": "Show HN: 15 yrs of Django in prod: patterns I keep using (agent skills)"}, {"id": 758982610, "item_id": 47436413, "url": "https://news.ycombinator.com/item?id=47436413", "by": "retep_kram", "date": "2026-03-19", "stance": "recommend", "quote": "the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested", "excerpt": "One of those instances of AI-generated code replicating another library's API, using a more low-level language for the core implementation. I love the idea of using new low-level languages and making libraries faster. But I wonder if there is a better way to recognize and value the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested in to make those libraries. Without the API", "context": "", "use_case": "data validation", "switched_from": "", "story": "FastAPI-compatible Python framework with Zig HTTP core; 7x faster"}, {"id": 755731670, "item_id": 47233229, "url": "https://news.ycombinator.com/item?id=47233229", "by": "iranu", "date": "2026-03-03", "stance": "neutral", "quote": "JSON goes through Pydantic validation before it touches the database.", "excerpt": "Hi HN, I built this. It's been in production across 500+ websites. We're a research group that studies online communications. We needed to scrape hundreds of sites regularly \u2014 news, blogs, forums, policy orgs \u2014 and maintain all those scrapers. At 10 sites, individual scrapers were fine. At 200+ we were spending more time fixing broken scrapers than doing actual work. Every redesign broke something, every new site mea", "context": "", "use_case": "validating configs", "switched_from": "", "story": "Show HN: ScrapAI \u2013 We scrape 500 sites. AI runs once per site, not per page"}, {"id": 740736450, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "recommend", "quote": "We use Pydantic heavily", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "data validation", "switched_from": "", "story": "Announcing the Beta release of ty"}, {"id": 739303809, "item_id": 46206488, "url": "https://news.ycombinator.com/item?id=46206488", "by": "arizen", "date": "2025-12-09", "stance": "recommend", "quote": "We wrap tool calls in strict Pydantic schemas to catch and retry malformed JSON", "excerpt": "Hi HN, I wanted to share a reference implementation I architected for moving AI Agents from local prototypes to production services. The Context: It is relatively easy to get an agent working on a local machine where you can watch the terminal output and restart it if it gets stuck. However, the architecture often breaks down when moving to a headless, hosted environment where the agent needs to handle loops, persist", "context": "", "use_case": "validating LLM tool calls", "switched_from": "", "story": "Show HN: Open-source reference architecture for AI Agents (LangGraph, Pydantic)"}, {"id": 737627221, "item_id": 46101701, "url": "https://news.ycombinator.com/item?id=46101701", "by": "bbor", "date": "2025-11-30", "stance": "recommend", "quote": "I see Astral and Pydantic as a league of their own in terms of advancing Python", "excerpt": "Over the past few months, I've switched a few decently-sized python codebases from MyPy (which I used for years) to PyreFly (because the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point), and finally to Ty after it left beta this week. I'm now running a fully Astral-ized (rust-ized!) setup: 1. packaging with uv (instead of pip or poetry), 2. type checking with ty (instead of the default ", "context": "", "use_case": "", "switched_from": "", "story": "Ty \u2013 A fast Python type checker, written in Rust"}, {"id": 734951072, "item_id": 45934442, "url": "https://news.ycombinator.com/item?id=45934442", "by": "mulmboy", "date": "2025-11-14", "stance": "recommend", "quote": "you can add complex pydantic validators (or whatever, I use pydantic) with super helpful error messages", "excerpt": "Along with a bunch of limitations that make it useless for anything but trivial use cases https://docs.claude.com/en/docs/build-with-claude/structured-outputs#not-supported I've found structured output APIs to be a pain across various LLMs. Now I just ask for json output and pick it out between first/last curly brace. If validation fails just retry with details about why it was invalid. This works very reliably for c", "context": "", "use_case": "validating LLM JSON output", "switched_from": "", "story": "Structured outputs on the Claude Developer Platform"}]}