FastAPI Resources and Book Recommendations
Introduction
You have built typed APIs with Pydantic, SQLAlchemy, JWT, tests, and deployment patterns. Keep growing by shipping one real service and reaching for official references when behavior surprises you. This chapter curates documentation, books, and Hello Code tracks that pair naturally with FastAPI.
Prerequisites
- Progress through this track (or equivalent FastAPI experience)
- At least one project chapter attempted (recommended)
How to Keep Learning
- Complete Todo API project or REST CRUD end-to-end
- Break something safely—wrong CORS, expired JWT, missing migration
- Fix with Troubleshooting and logs
- Run
pytestandpip auditin CI before deploy
Reading without running leaves gaps in validation, auth, and deploy timing.
Official References
| Resource | Best for |
|---|---|
| FastAPI documentation | Authoritative tutorials and API reference |
| Pydantic v2 docs | Schemas, validators, settings |
| Starlette docs | Middleware, requests, WebSockets |
| SQLAlchemy 2.0 docs | ORM, sessions, queries |
| Uvicorn docs | ASGI server options |
| Alembic docs | Migrations |
Recommended Books and Courses
Community guides around FastAPI
- Official FastAPI tutorial (online)—start here after this track
- Blog posts and video courses on FastAPI + React—verify Pydantic v2 and SQLAlchemy 2.0
Architecture Patterns with Python (Percival & Gregory)
- Repository pattern, service layer, domain modeling—framework-agnostic
- Helps when FastAPI projects outgrow fat route files
High Performance Python (Gorelick & Ozsvald)
- Profiling and concurrency when APIs need tuning
Pick one deep resource and apply it to your Todo or Items project—not three at once.
Pair With Hello Code Tracks
| Track | Connection |
|---|---|
| Python | Syntax, pip, type hints |
| Flask | WSGI, templates, sessions—compare stacks |
| MySQL | Schema design, SQL debugging |
| Redis | Caching and rate limits |
| Git | CI, collaboration |
| Linux | Server ops |
| Nginx | Reverse proxy, TLS |
| Spring Boot | Enterprise JVM APIs, JWT compare |
| MongoDB | Document store with FastAPI lifespan pattern |
Framework Choice Recap
| Goal | Track |
|---|---|
| JSON API, OpenAPI, async | FastAPI (this track) |
| Server-rendered HTML, forms | Flask |
| Large CMS, built-in admin | Django (external docs) |
Many teams use Flask for admin HTML and FastAPI for public API in the same organization.
Advanced Topics (Next Steps)
| Topic | Where to go |
|---|---|
| Async SQLAlchemy | Async database chapter |
| Task queues | Celery, RQ—Flask background tasks |
| OpenAPI codegen | openapi-generator, orval for TypeScript clients |
| Observability | OpenTelemetry, Sentry, structured JSON logs |
| Kubernetes | Helm after Docker chapter |
| OAuth2 social login | Authlib, external IdP docs |
Community
- FastAPI GitHub — releases and discussions
- Pydantic GitHub — validation edge cases
- Pin versions in
requirements.txt; read changelogs before major upgrades
Tip
Upgrade in a Branch
Run full pytest and manual /docs smoke test after bumping FastAPI or Pydantic major versions.
FAQ
FastAPI vs Flask for new API?
FastAPI if you want types and OpenAPI first; Flask if team already standardized on Flask extensions.
Learn Django after FastAPI?
Yes if you need admin, ORM batteries, and monolith—different product shape.
Certification?
No mainstream FastAPI cert—portfolio APIs matter more for juniors.
Official docs enough?
Yes for daily work—this track adds Hello Code cross-links and deploy checklist.
Chinese planning outline?
frontend/gen_article_plan/fastapi.md.
Category logo?
/category-logos/fastapi.png in category_meta_info.json.