SYSTEM Cited by 1 source
FastAPI¶
Definition¶
FastAPI is a modern async Python web framework built on Starlette + Pydantic. It provides native support for Server-Sent Events (SSE) and async request handlers, making it a natural fit for streaming LLM token responses — the use case that motivated Yelp's migration from Pyramid to FastAPI for BAA.
Role at Yelp (2026-03-27)¶
"Streaming was the biggest win: By streaming the response from the LLM we have very low latency for the TTFB (Time to first Byte). This was facilitated by migrating from pyramid to a fastapi server that supports sse (Server side events)." (Source: sources/2026-03-27-yelp-building-biz-ask-anything-from-prototype-to-product)
Load-bearing properties:
- SSE support — enables token-by-token streaming to the browser.
- Async handlers — compatible with async LangChain invocation for parallel question analysis.
- TTFT dominant — streaming flips the user-visible latency from "wait for full response" to "see first token". See concepts/time-to-first-token.
Caveats¶
- Stub page. Deeper FastAPI architecture (Pydantic model validation, dependency injection, OpenAPI schema generation) is not walked here.
Seen in¶
- sources/2026-03-27-yelp-building-biz-ask-anything-from-prototype-to-product — Yelp migrated from Pyramid to FastAPI specifically for SSE-based LLM token streaming.
Related¶
- systems/yelp-biz-ask-anything — the canonical consumer.
- concepts/time-to-first-token — the latency metric the SSE migration targeted.
- companies/yelp