mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-21 15:00:57 +00:00
2b4a557456
- API(metrics_route="/metrics") serves request counts and latency histograms in Prometheus text format, zero dependencies. Labels use route patterns to bound cardinality; the collector sits as middleware outside the exception layer so errors record real status codes - API(session_backend=...) stores sessions server-side (Memory/Redis backends, or any get/set/delete object) with only an opaque ID in the cookie — revocable, unbounded size, handler code unchanged - @api.route(..., params_model=Model) validates and coerces query strings with Pydantic: 422 on failure, req.state.validated_params, repeated keys map to list fields, documented in the OpenAPI spec - resp.render(template, **context) renders a Jinja2 template as the HTML body in one call Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>