Serving ML Easily With FastAPI
summary
FastAPI shows how to turn a working ML model (spaCy entity extractor in examples) into a production JSON API with minimal code, delivering automatic OpenAPI interactive docs, Pydantic data validation and editor autocompletion, OAuth2 hooks, and dependency injection wired into docs. It relies on Starlette + Uvicorn, uses standard Python type hints, and demonstrates >15,000 GitHub stars growth plus benchmarks around 15k requests/sec, proving the served endpoints validate inputs, document themselves, and perform.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:45About FastAPI
- 2:24FastAPI Basics
- 3:22Support for type annotations
- 4:17Concise backend code
- 6:00Challenge: serving a machine learning model
- 7:33How API routes and documentation work
- 11:30Parsing HTTP body and query
- 18:05Making ML calls from the API app
- 23:20Data validation of the HTTP body
- 28:52IDE auto-completion and type checks
- 30:49Documenting fields with metadata
- 32:57Declaring mandatory fields and validating requests
- 36:56Performance
- 38:27Additional features
- 39:50About typer and thing libraries
- 41:30Q&A
related talks
24mHow Generative AI Apps Use APIs
49mNext-Gen Documentation with AI
35mHarnessing AI for API Business Documentation in a Devportal CMS [...]
17mML-Driven API Standardization: Boosting Efficiency & Developer XP
49mNext-Gen Documentation with AI
43mLarge Language Models for Devs: from zero to your first LLM application
42mAdd Useful AI to Your Web App (Not Just Chatbots)
48mBuilding Scalable AI Tool Servers with Model Context Protocol (MCP) and Heroku
