kennethreitz 8f979719a0 Remove poethepoet, use direct commands in CI
Replace all poe task runner usage with direct pytest/sphinx/ruff
commands. Remove poethepoet dependency and [tool.poe.tasks] config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 07:50:32 -04:00
2018-10-11 13:57:55 -04:00
2024-10-24 02:27:32 +02:00

Responder: a familiar HTTP Service Framework for Python

ci-tests ci-docs Documentation Status version license python-versions downloads contributors status

responder-synopsis

Responder is powered by Starlette. View documentation.

Responder gets you an ASGI app, with a production static files server pre-installed, Jinja templating, and a production webserver based on uvloop, automatically serving up requests with gzip compression. The async declaration within the example program is optional.

Testimonials

"Pleasantly very taken with python-responder. @kennethreitz at his absolute best." —Rudraksh M.K.

"ASGI is going to enable all sorts of new high-performance web services. It's awesome to see Responder starting to take advantage of that." — Tom Christie author of Django REST Framework

"I love that you are exploring new patterns. Go go go!" — Danny Greenfield, author of Two Scoops of Django

More Examples

See the documentation's feature tour for more details on features available in Responder.

Installing Responder

Install the most recent stable release:

pip install --upgrade responder

Alternatively, install directly from the repository:

pip install 'responder @ git+https://github.com/kennethreitz/responder.git'

Responder supports Python 3.9+.

The Basic Idea

The primary concept here is to bring the niceties from both Flask and Falcon and unify them into a single framework. You'll find a familiar API with a clean, Pythonic design.

  • Setting resp.text sends back unicode, while setting resp.html sends back HTML.
  • Setting resp.media sends back JSON/YAML (.text/.html/.content override this).
  • Setting resp.content sends back bytes.
  • Use resp.file("path") to serve files with automatic content-type detection.
  • Case-insensitive req.headers dict.
  • resp.status_code, req.method, req.url, and other familiar friends.

Features

  • Flask-style route expressions with f-string syntax and type convertors (str, int, float, uuid, path).
  • HTTP method filtering: @api.route("/data", methods=["GET"]).
  • Every request and response is passed into each view and mutated — including response.media for JSON/YAML content negotiation.
  • Built-in test client powered by Starlette's TestClient.
  • Mount other WSGI/ASGI apps at subroutes.
  • Automatic gzip compression.
  • Class-based views with on_get, on_post, on_request methods.
  • GraphQL support via Graphene with api.graphql().
  • OpenAPI schema generation with interactive docs.
  • Lifespan context managers for startup/shutdown.
  • Custom exception handlers.
  • Before-request hooks with short-circuit support.
  • Cookie-based sessions.
  • WebSocket support.
  • Background tasks.
  • Production uvicorn server built-in.

Development

See Development Sandbox.

Supported by

JetBrains logo.

Special thanks to the kind people at JetBrains s.r.o. for supporting us with excellent development tooling.

Languages
Python 98.6%
HTML 1.4%