PacktPublishing/FastAPI-Cookbook ? reverse-engineered prompt
Reverse engineered prompt
Build me a FastAPI learning project that shows how to build a real API and web app step by step, with each chapter in its own folder so it is easy to follow. I want the examples to start simple with routing and request validation, then move into more advanced things like dependency injection, custom middleware, authentication, database access, WebSockets, testing, debugging, and deployment. Use Python 3.9 or newer, and make sure the code is clean enough that I can run each chapter on its own and understand what changed.
Please include practical examples that feel like real app features, not toy snippets, and add both unit and integration tests where it makes sense. If you need to check the latest FastAPI docs or related library docs online, do that. I mainly want a polished, educational codebase that helps me learn how to build scalable FastAPI apps from scratch.
Are you gonna build this?
make sure you review the code using coderabbit