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.