Releases: kennethreitz/responder
v3.6.2
Fixed
- GraphQL error responses now correctly return 400 status instead of always 200
- OpenAPI docs UI now respects custom
openapi_routeinstead of hardcoding/schema.yml before_requestsdefault type mismatch that could crash routes called outside the router- Blocking synchronous file I/O in
Response.stream_file()— now uses async I/O via anyio - Memory leak in rate limiter (empty bucket keys never cleaned up)
- Race condition in rate limiter
check()— added thread-safe locking - WSGI fallback catching all
TypeErrors instead of just call-signature mismatches - Pydantic request/response model validation crashing on non-dict bodies
CaseInsensitiveDictmissing__delitem__,pop, andsetdefaultoverridesassertused for input validation in OpenAPI extension (stripped bypython -O)- Potential XSS in GraphiQL template endpoint injection
Changed
DELETErequests now participate in Pydantic request body validation- Simplified status code category check to use chained comparison
Removed
- Unused
methodparameter fromload_target() - Unused Node.js setup step from CI test workflow
v3.6.1
Added
- Configurable GZip compression via
gzipparameter onAPI()(defaults toTrue)
v3.6.0
Highlights
Structured Logging
Built-in structured logging with per-request context — enable with enable_logging=True:
api.log— always-available logger, enriched with request context- Automatic access logging with timing:
GET /path → 200 (1.2ms) - Request ID generation/forwarding via
X-Request-IDheader contextvars-based request context on every log record
Documentation Overhaul
Comprehensive documentation improvements across deployment, API reference, feature tour, tutorials, testing, middleware, quickstart, and sandbox pages.
What's Changed
- Added structured logging with per-request context (
responder.ext.logging) - Added CLAUDE.md project guide and
/releasecommand - Added version number in docs sidebar
- Comprehensive documentation improvements across all pages
- Docker example uses
uvinstead of pip - Removed
uv.lock(this is a library, not an application)
Full Changelog: https://github.com/kennethreitz/responder/blob/main/CHANGELOG.md
v3.5.0
Highlights
- Python 3.14 & PyPy support — CI now validates on 3.14, 3.14 free-threaded, and PyPy 3.11
- Fix WSGI mount bug — mounting Flask/WSGI apps at a prefix and requesting the exact prefix no longer returns 400
- Python 3.16 readiness — replaced all deprecated
asyncio.iscoroutinefunctioncalls withinspect.iscoroutinefunction - Improved GraphQL interface with expanded tests
- Werkzeug 3.1.7 compatibility
- Code quality — narrowed broad exception handlers, fixed test correctness, code formatting cleanup
📦 PyPI: https://pypi.org/project/responder/3.5.0/
See the full changelog.
v3.4.0
What's New
- Comprehensive docstrings across all public API classes and methods —
API,Request,Response,Router,Route,BackgroundQueue,QueryDict, and more - Expanded API reference with autodoc sections for
RouteGroup,BackgroundQueue,QueryDict, andRateLimiter - Starlette 1.0 support — upgraded dependency to
starlette[full]>=1.0
Breaking Changes
- Python 3.9 dropped — minimum version is now Python 3.10 (required by Starlette 1.0)
Install
pip install responder==3.4.0
v3.3.0
v3.3.0 — Documentation
Comprehensive documentation overhaul with seven new tutorial pages, three new examples, and educational prose throughout.
New tutorials:
- Building a REST API — full CRUD with Pydantic validation
- Using SQLAlchemy — async ORM with lifespan pattern
- Authentication — API keys, JWT tokens, session auth
- WebSocket Tutorial — echo server, chat room, HTML client
- Writing Middleware — hooks vs middleware, ordering, Starlette integration
- Migrating from Flask — side-by-side reference table, gradual migration
- Configuration — env vars, .env files, secrets, production setup
New examples:
examples/rest_api.py— complete REST APIexamples/websocket_chat.py— chat room with HTML clientexamples/sse_stream.py— Server-Sent Events
Docs improvements:
- Every page now teaches web development concepts alongside the code
- Complete working example at end of quickstart
- Rewritten CLI and API reference pages
- Homepage prose refined
176 tests, 95% coverage.
v3.2.0
What's New in 3.2.0
Pydantic auto-validation and response serialization:
request_model=MyModelvalidates request bodies, returns 422 on failureresponse_model=MyModelserializes responses, strips extra fields
Server-Sent Events:
@resp.ssefor real-time streaming (AI responses, live feeds, progress)
File streaming:
resp.stream_file("large.csv")— stream without loading into memory
After-request hooks:
@api.after_request()— run code after every request
Route groups:
v1 = api.group("/v1")— organize routes with shared prefixes
Request ID:
api = responder.API(request_id=True)— auto-generate trace IDs
Rate limiting:
RateLimiter(requests=100, period=60).install(api)
MessagePack:
await req.media("msgpack")— binary serialization alongside JSON/YAML
Bug fixes:
- Fix streaming responses not sending Content-Type headers
- Fix GraphQL text query missing await
176 tests, 95% coverage.
v3.1.0
What's New
New features:
- HTTP method filtering —
@api.route("/data", methods=["GET"]) - Lifespan context managers for startup/shutdown
api.exception_handler()for custom error handlingapi.graphql()one-liner GraphQL setupresp.file()to serve files with auto content-type detection- Before-request hooks now short-circuit when status code is set
req.path_params,req.client,req.is_jsonpropertiesuuidandpathroute convertors- PEP 561
py.typedmarker
Bug fixes:
- Fix multipart parser losing headers when parts have multiple headers
- Fix
url_for()with typed route params ({id:int}) - Fix
resp.bodyencoding crash on bytes content - Fix GraphQL text query missing
await - Fix Python 3.9 compatibility for type annotations
Breaking changes:
pip install respondernow installs everything (GraphQL, OpenAPI, CLI) — no more extras- Removed
poethepoettask runner - Minimum Python version is 3.9
Stats: 159 tests, 96% coverage.
v2.0.7
What's Changed
- Add test for 3.9 by @taoufik07 in #448
- Add uvicorn[extra] by @taoufik07 in #450
Full Changelog: v2.0.6...v2.0.7
v2.0.6
What's Changed
- Bump bleach from 3.0.2 to 3.1.1 in /docs by @dependabot in #421
- Fixes and bump dependencies by @taoufik07 in #424
- Fix hash in pygment from piwheel to pypi. by @ucpr in #430
- bump uvicorn 0.11.* to 0.11.7 by @ryuuji in #439
- test_redirects: access '/2' and redirect to '/1' by @majiang in #445
- Call user-provided
default_responseby @majiang in #444 - Switch to github actions by @taoufik07 in #446
- Bump bleach from 3.1.1 to 3.1.4 in /docs by @dependabot in #429
- docs: fix simple typo, mashmallow -> marshmallow by @timgates42 in #447
New Contributors
- @ryuuji made their first contribution in #439
- @majiang made their first contribution in #445
- @timgates42 made their first contribution in #447
Full Changelog: v2.0.5...v2.0.6