Skip to content

Releases: kennethreitz/responder

v3.6.2

12 Apr 22:12

Choose a tag to compare

Fixed

  • GraphQL error responses now correctly return 400 status instead of always 200
  • OpenAPI docs UI now respects custom openapi_route instead of hardcoding /schema.yml
  • before_requests default 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
  • CaseInsensitiveDict missing __delitem__, pop, and setdefault overrides
  • assert used for input validation in OpenAPI extension (stripped by python -O)
  • Potential XSS in GraphiQL template endpoint injection

Changed

  • DELETE requests now participate in Pydantic request body validation
  • Simplified status code category check to use chained comparison

Removed

  • Unused method parameter from load_target()
  • Unused Node.js setup step from CI test workflow

v3.6.1

12 Apr 21:52

Choose a tag to compare

Added

  • Configurable GZip compression via gzip parameter on API() (defaults to True)

v3.6.0

24 Mar 20:25

Choose a tag to compare

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-ID header
  • 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 /release command
  • Added version number in docs sidebar
  • Comprehensive documentation improvements across all pages
  • Docker example uses uv instead of pip
  • Removed uv.lock (this is a library, not an application)

Full Changelog: https://github.com/kennethreitz/responder/blob/main/CHANGELOG.md

PyPI: https://pypi.org/project/responder/3.6.0/

v3.5.0

24 Mar 19:27

Choose a tag to compare

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.iscoroutinefunction calls with inspect.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

23 Mar 01:39

Choose a tag to compare

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, and RateLimiter
  • 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

22 Mar 17:58

Choose a tag to compare

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 API
  • examples/websocket_chat.py — chat room with HTML client
  • examples/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

22 Mar 16:46

Choose a tag to compare

What's New in 3.2.0

Pydantic auto-validation and response serialization:

  • request_model=MyModel validates request bodies, returns 422 on failure
  • response_model=MyModel serializes responses, strips extra fields

Server-Sent Events:

  • @resp.sse for 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

22 Mar 11:57

Choose a tag to compare

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 handling
  • api.graphql() one-liner GraphQL setup
  • resp.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_json properties
  • uuid and path route convertors
  • PEP 561 py.typed marker

Bug fixes:

  • Fix multipart parser losing headers when parts have multiple headers
  • Fix url_for() with typed route params ({id:int})
  • Fix resp.body encoding crash on bytes content
  • Fix GraphQL text query missing await
  • Fix Python 3.9 compatibility for type annotations

Breaking changes:

  • pip install responder now installs everything (GraphQL, OpenAPI, CLI) — no more extras
  • Removed poethepoet task runner
  • Minimum Python version is 3.9

Stats: 159 tests, 96% coverage.

v2.0.7

27 Oct 17:18

Choose a tag to compare

What's Changed

Full Changelog: v2.0.6...v2.0.7

v2.0.6

27 Oct 17:18

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.5...v2.0.6