Pydantic

A shop ledger page, 1899. Every line adds up.
How to Validate Structured Output from an LLM in a Production Application
Validate language-model output with schemas, business rules, retries, and explicit failure states instead of assuming generated JSON is correct.
4 min read
SQLAlchemy Many-to-Many Relationships in a FastAPI POST Endpoint
Create a post with tags in FastAPI and SQLAlchemy: an association table, loading existing tags, avoiding duplicates, and separate Pydantic input and output schemas.
4 min read
Fixing Slow Serialization of Large Nested Pydantic Responses in FastAPI
An endpoint returns quickly in the database but slowly over HTTP. Profile first, then reduce response_model overhead, validate once, trim payloads, and paginate.
5 min read