FastAPI
FastAPI is a Python web framework for building APIs, using type annotations for request handling and validation and generating 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 →
Software Engineering for Data Scientists
FastAPI is a Python web framework for building APIs with type-hint-based request validation and automatic interface documentation.
- How it is used
- Converts Python model code into callable APIs for prototyping, production deployment, and access from other environments.
- How deep it goes
- Progresses from installation and a test route to typed model inputs, prediction handling, server launch, and client requests.
- Examples
- Uses a test message endpoint and a customer-churn probability endpoint exercised through Python requests.
- What you can do after
- Builds and operates a Python API that validates structured inputs and serves machine-learning predictions.
Read how Software Engineering for Data Scientists 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 →
Also covered in
- Secure APIs
- Deep Learning with PyTorch, Second Edition
- AI Agents in Action
- Designing AI SystemsIn early access (MEAP)
- MongoDB 8.0 in Action, Third Edition
- Architecting an Apache Iceberg Lakehouse
- Build Python Web Apps with Streamlit
- Grokking AI Applications
- Machine Learning Platform Engineering
What to know first
- PythonPython is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- contractA contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- JavaScriptJavaScript is a high-level, dynamically typed programming language standardized as ECMAScript and used for web and general-purpose programming.
Related concepts
- frameworkkind of · A software framework is a reusable foundation of components, conventions, and supporting mechanisms that structures application development and provides common functionality and extension points.
- Uvicornused by · Uvicorn is an asynchronous Python web-server implementation that runs applications conforming to the Asynchronous Server Gateway Interface.
- Pythonuses · Python is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- Pydanticuses · Pydantic is a Python library for defining typed data models and schemas and validating, parsing, and serializing data against them.
- contractuses · A contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
Questions about FastAPI
What is FastAPI?
FastAPI is a Python web framework for building APIs, using type annotations for request handling and validation and generating OpenAPI documentation.
Which Manning books explain FastAPI?
Build Financial Software with Generative AI (From Scratch), Software Engineering for Data Scientists, LLMs in Production, Domain-Specific Small Language Models, Road to Kubernetes and AI Agents in Action, Second Edition.
What should I know before learning FastAPI?
Manning books that teach FastAPI usually introduce Python, contract, HTML and JavaScript first.
What is FastAPI a kind of?
FastAPI is a kind of framework. A software framework is a reusable foundation of components, conventions, and supporting mechanisms that structures application development and provides common functionality and extension points.
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.





