File: app.rst

package info (click to toggle)
python-falcon 3.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,204 kB
  • sloc: python: 28,455; makefile: 184; sh: 139; javascript: 66
file content (51 lines) | stat: -rw-r--r-- 960 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.. _app:

The App Class
=============

* `WSGI App`_
* `ASGI App`_
* `Options`_

Falcon supports both the WSGI (:class:`falcon.App`) and
ASGI (:class:`falcon.asgi.App`) protocols. This is done
by instantiating the respective ``App`` class to create a
callable WSGI or ASGI "application".

Because Falcon's ``App`` classes are built on
`WSGI <https://www.python.org/dev/peps/pep-3333/>`_ and
`ASGI <https://asgi.readthedocs.io/en/latest/>`_,
you can host them with any standard-compliant server.

.. code:: python

    import falcon
    import falcon.asgi

    wsgi_app = falcon.App()
    asgi_app = falcon.asgi.App()

WSGI App
--------

.. autoclass:: falcon.App
    :members:

ASGI App
--------

.. autoclass:: falcon.asgi.App
    :members:

Options
-------

.. autoclass:: falcon.RequestOptions
    :members:

.. autoclass:: falcon.ResponseOptions
    :members:

.. _compiled_router_options:
.. autoclass:: falcon.routing.CompiledRouterOptions
    :noindex: