FastAPI
FastAPI is a Python web framework for building APIs, with type-annotation-based request handling, validation, and automatic OpenAPI documentation.
Build Financial Software with Generative AI (From Scratch)
FastAPI is a Python web framework for building application programming interfaces with automatic validation and documentation.
- How it is used
- Builds APIs for ACH processing and dashboard functionality, with generated OpenAPI documentation.
- How deep it goes
- Works through basic GET stubs and routers, while deferring pagination and asynchronous processing for production needs.
- Examples
- Uses a health check, hardcoded GET responses, and APIs for ACH processing and dashboard functionality.
- What you can do after
- Apply it via FastAPI to build REST APIs and generate interactive OpenAPI documentation.
Read how Build Financial Software with Generative AI (From Scratch) explains FastAPI →
LLMs in Production
FastAPI is a Python web framework for building HTTP APIs with type-based request validation and automatic interface documentation.
- How it is used
- Deploys machine-learning models behind customizable HTTP APIs when more automated serving frameworks do not provide enough flexibility.
- How deep it goes
- Demonstrates a local model-serving endpoint and discusses production integration, but does not develop FastAPI internals.
- Examples
- Uses a DeciCoder endpoint, Python server, stop tokens, and a curl request generating a Hello World function.
- What you can do after
- Operate a local model API by running a Python server and calling its generation endpoint with curl.
Domain-Specific Small Language Models
A Python web framework for building APIs with automatic documentation, asynchronous request handling, and data validation support.
- How it is used
- Exposes machine-learning inference through Python web APIs, including routes for language-model generation.
- How deep it goes
- Moves from app setup and routes to server startup, validation, and an ONNX inference endpoint.
- Examples
- Uses GET and POST routes, interactive API docs, and a CPU-hosted GPT-2 small ONNX generation endpoint.
- What you can do after
- Build from scratch: define routes and validated request data, start a server, and expose model generation through an API.
Read how Domain-Specific Small Language Models explains FastAPI →
Road to Kubernetes
FastAPI is a Python web framework for building APIs.
- How it is used
- Builds simple Python web applications and REST APIs that handle request/response cycles.
- How deep it goes
- Explains setup, application structure, JSON responses, route handlers, and development serving, but defers production deployment details.
- Examples
- Demonstrates a Hello World endpoint, a versioned hello-world route, and Uvicorn running on port 8011.
- What you can do after
- Build it from scratch by creating a FastAPI application, adding route handlers, returning JSON, and running it with Uvicorn.
AI Agents in Action, Second Edition
FastAPI is a Python web framework for building APIs with type-based request validation and automatic interface documentation.
- How it is used
- Wraps an agent in a callable HTTP service that accepts messages and returns a simple payload.
- How deep it goes
- Demonstrates typed input, asynchronous POST handling, binary responses, launch commands, and missing-output errors.
- Examples
- Uses an image-generator endpoint, curl and PowerShell requests, saved PNG files, and Dockerized service runs.
- What you can do after
- Operate/configure a FastAPI agent service, call its POST endpoint, verify image output, and run it in Docker.
Read how AI Agents in Action, Second Edition explains FastAPI →
Related concepts
- frameworkkind of · A reusable software foundation that provides structure, abstractions, components, conventions, or extension points for building applications or other software systems.
- Pythonuses · Python is a high-level, general-purpose, dynamically typed programming language with readable syntax and automatic memory management.
- Pydanticuses · Pydantic is a Python library for defining typed data models and schemas, validating and parsing data against them, and serializing validated values.
- contractuses · An API contract is a specification of the operations, data, and behavioral expectations that govern communication between an API and its clients.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




