API Reference ============= This page documents Responder's public Python API. For usage examples and explanations, see the :doc:`quickstart` and :doc:`tour`. The API Class ------------- The central object of every Responder application. It holds your routes, middleware, templates, and configuration. Create one at the top of your module and use it to define your entire web service. .. module:: responder .. autoclass:: API :inherited-members: Request ------- The request object is passed into every view as the first argument. It gives you access to everything the client sent — headers, query parameters, the request body, cookies, and more. Most properties are synchronous, but reading the body requires ``await`` because it involves I/O. .. autoclass:: Request :inherited-members: Response -------- The response object is passed into every view as the second argument. Mutate it to control what gets sent back to the client — the body, status code, headers, and cookies. .. autoclass:: Response :inherited-members: Status Code Helpers ------------------- Convenience functions for checking which category a status code falls into. Useful in middleware and after-request hooks. .. autofunction:: responder.status_codes.is_100 .. autofunction:: responder.status_codes.is_200 .. autofunction:: responder.status_codes.is_300 .. autofunction:: responder.status_codes.is_400 .. autofunction:: responder.status_codes.is_500