Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A familiar HTTP Service Framework for Python.
Responder is a Python web framework that brings the familiar request/response style of Flask and Falcon to ASGI, powered by Starlette, for building small, expressive HTTP services. Created by Kenneth Reitz, it is published on PyPI under the Apache-2.0 license and supports Python 3.11 and newer.
Responder is an open-source HTTP service framework for Python that turns sync or async view functions into an ASGI web service with routing, validation, OpenAPI documentation, and production middleware. Each view receives a mutable req request object and a resp response object; you read from one and write to the other, with outputs supported as resp.text, resp.html, resp.media, resp.file(), and resp.problem(). Install it with pip install "responder[orjson]", run the built-in uvicorn runner with python app.py, and the quickstart service listens on http://127.0.0.1:5042.
def view(req, resp) with mutable request and response objects; both sync and async views work, and returning a dict from a view is also accepted.openapi="3.1.0", title, version, and docs_route="/docs" serves Swagger UI at /docs and the schema at /schema.yml; the responder client CLI generates client code for Python, JavaScript, TypeScript, Ruby, and PHP.responder.ext.auth includes BearerAuth, JWT and OAuth2 helpers, signed and server-side sessions, CSRF protection via API(csrf=True), and route policies such as api.policy("writer", auth.requires("items:write")).@api.sse and @api.ndjson endpoints validate and serialize each item as it is yielded, support heartbeats, and include the item schema in OpenAPI so generated clients expose lazy iterators instead of buffering.req and resp while moving to ASGI, Starlette routing, and uvicorn.tarot.py, fortunes.py, and websocket_chat.py make it approachable for prototypes, experiments, and teaching./docs plus validated Problem Details errors for 401, 403, and 422.Install with pip install "responder[orjson]", create an api = responder.API() instance, decorate views with @api.get("/path"), and run with python app.py or the responder run app.py CLI. Responder reads route decorators, type hints, and Pydantic models to validate requests, serialize responses, and build the OpenAPI schema automatically.
Yes. Responder is open-source software on PyPI under the Apache-2.0 license. The recommended install is pip install "responder[orjson]" on standard GIL-enabled CPython; free-threaded CPython builds (3.14t and 3.15t) should install the base package.
Responder supports Python 3.11 and newer. When orjson is unavailable, it falls back to the standard-library JSON encoder, so no application code changes are required.
Yes. Passing openapi="3.1.0" with a title, version, and docs_route="/docs" makes Responder build the schema from routes, type hints, Pydantic models, auth helpers, and framework behavior. The documentation UI appears at /docs, the schema at /schema.yml, and the responder client CLI generates clients for five languages.
Request bodies are capped at 100 MiB by default in Responder 9; pass API(max_request_size=None) for the legacy unlimited behavior. Framework-generated errors use RFC 9457-style application/problem+json responses, covering things like 413 body-cap violations and 429 rate limits.
Yes. The @api.sse decorator serves server-sent events with heartbeat intervals and per-event metadata, and @api.ndjson streams newline-delimited JSON. Each yielded item is validated and serialized as it is produced.
