AI Engineering in Practice10 min read
API schemas: separating db models from API responses
Why exposing DB models as API responses leaks sensitive fields. The Pydantic separation pattern, the 3 schema layers, and the safe FastAPI response.
Loading...
Build Your First Software Factory Execution Harness live Thursday, Oct 1, 12:00 PM ET
Oct 1, Reserve a seatExplore our latest articles and insights about API Development.
20 posts in total
AI Engineering in Practice10 min read
Why exposing DB models as API responses leaks sensitive fields. The Pydantic separation pattern, the 3 schema layers, and the safe FastAPI response.
AI Engineering in Practice11 min read
How to model users and conversation sessions for multi-tenant AI agents. The schema, the tenant guard, and the pattern that scales to thousands.
AI Engineering in Practice10 min read
Why your agentic AI service hits 'broken pipe' errors at 100 users and how SQLAlchemy connection pools fix it. The sizing rule and the lifespan pattern.
AI Engineering in Practice10 min read
How SQLModel gives agentic AI systems type-safe structured storage. The end of JSON blob columns, the Pydantic bridge, and the 50-line pattern.
AI Engineering in Practice11 min read
Why every agentic AI container should run as a non-root user. The Dockerfile pattern, the permission gotchas, and the attack it actually prevents.
AI Engineering in Practice11 min read
Why agentic AI systems need .env.development and .env, not one shared file. The config pattern that prevents leaked keys and broken deploys.
AI Engineering in Practice11 min read
How to use FastAPI and Uvicorn for production agentic AI. Async event loops, ASGI workers, streaming, and the gotchas that quietly kill agent uptime.
AI Engineering in Practice18 min read
How engineering works in production. Learn to build a complete AI Bedtime Story Generator from scratch. A practical tutorial covering FastAPI, streaming re