1.. _api.webapp2: 2 3webapp2 4======= 5.. module:: webapp2 6 7- WSGI app 8 9 - :class:`WSGIApplication` 10 - :class:`RequestContext` 11 12- URI routing 13 14 - :class:`Router` 15 - :class:`BaseRoute` 16 - :class:`SimpleRoute` 17 - :class:`Route` 18 19- Configuration 20 21 - :class:`Config` 22 23- Request and Response 24 25 - :class:`Request` 26 - :class:`Response` 27 28- Request handlers 29 30 - :class:`RequestHandler` 31 - :class:`RedirectHandler` 32 33- Utilities 34 35 - :class:`cached_property` 36 - :func:`get_app` 37 - :func:`get_request` 38 - :func:`redirect` 39 - :func:`redirect_to` 40 - :func:`uri_for` 41 - :func:`abort` 42 - :func:`import_string` 43 - :func:`urlunsplit` 44 45 46WSGI app 47-------- 48.. seealso:: 49 :ref:`guide.app` 50 51.. autoclass:: WSGIApplication 52 :members: request_class, response_class, request_context_class, 53 router_class, config_class, 54 debug, router, config, registry, error_handlers, app, request, 55 active_instance, allowed_methods, 56 __init__, __call__, set_globals, clear_globals, 57 handle_exception, run, get_response 58 59.. autoclass:: RequestContext 60 :members: __init__, __enter__, __exit__ 61 62 63URI routing 64----------- 65.. seealso:: 66 :ref:`guide.app.router` and :ref:`guide.routing` 67 68.. autoclass:: Router 69 :members: route_class, __init__, add, 70 match, build, 71 dispatch, adapt, 72 default_matcher, default_builder, 73 default_dispatcher, default_adapter, 74 set_matcher, set_builder, 75 set_dispatcher, set_adapter 76 77.. autoclass:: BaseRoute 78 :members: template, name, handler, handler_method, handler_adapter, 79 build_only, match, build, get_routes, get_match_routes, 80 get_build_routes 81 82.. autoclass:: SimpleRoute 83 :members: __init__, match 84 85.. autoclass:: Route 86 :members: __init__, match, build 87 88 89Configuration 90------------- 91.. seealso:: 92 :ref:`guide.app.config` 93 94.. autoclass:: Config 95 :members: __init__, load_config 96 97 98Request and Response 99-------------------- 100.. seealso:: 101 :ref:`guide.request` and :ref:`guide.response` 102 103.. autoclass:: Request 104 :members: app, response, route, route_args, route_kwargs, registry, 105 __init__, get, get_all, arguments, get_range 106 107 108.. autoclass:: Response 109 :members: __init__, status, status_message, has_error, clear, wsgi_write, 110 http_status_message 111 112 113Request handlers 114---------------- 115.. seealso:: 116 :ref:`guide.handlers` 117 118.. autoclass:: RequestHandler 119 :members: app, request, response, __init__, initialize, dispatch, error, 120 abort, redirect, redirect_to, uri_for, handle_exception 121 122 123.. autoclass:: RedirectHandler 124 :members: get 125 126 127Utilities 128--------- 129These are some other utilities also available for general use. 130 131.. autoclass:: cached_property 132 133.. autofunction:: get_app 134 135.. autofunction:: get_request 136 137.. autofunction:: redirect 138 139.. autofunction:: redirect_to 140 141.. autofunction:: uri_for 142 143.. autofunction:: abort 144 145.. autofunction:: import_string 146 147 148.. _Another Do-It-Yourself Framework: http://docs.webob.org/en/latest/do-it-yourself.html 149.. _Flask: http://flask.pocoo.org/ 150.. _Tornado: http://www.tornadoweb.org/ 151.. _WebOb: http://docs.webob.org/ 152.. _Werkzeug: http://werkzeug.pocoo.org/ 153