Skip to content

v9.2.0

Latest

Choose a tag to compare

@kennethreitz kennethreitz released this 14 Jul 04:14
· 1 commit to main since this release

Responder 9.2 makes typed SSE and NDJSON complete incremental response contracts, from per-item runtime validation through OpenAPI and generated streaming clients.

Highlights

  • @api.sse and @api.ndjson infer item contracts from sync or async iterator return annotations, with explicit model overrides when needed.
  • Every yielded item is validated and serialized with Pydantic while preserving backpressure, cancellation cleanup, SSE heartbeats, and Last-Event-ID.
  • responder.SSE[T] provides typed data and standard SSE metadata.
  • OpenAPI describes stream media types and item schemas, and generated Python, JavaScript, TypeScript, Ruby, and PHP clients consume streams lazily.
  • Immediately available first-item contract failures return HTTP 500 before headers are sent; later failures are logged and terminate the stream without emitting invalid data.

Full changelog