Classes | Functions | Variables
rosbridge_tools::tornado::web Namespace Reference

Classes

class  _linkify
class  _RequestDispatcher
class  _UIModuleNamespace
class  _xsrf_form_html
class  Application
class  ErrorHandler
class  FallbackHandler
class  Finish
class  GZipContentEncoding
class  HTTPError
class  MissingArgumentError
class  OutputTransform
class  RedirectHandler
class  RequestHandler
class  StaticFileHandler
class  TemplateModule
class  UIModule
class  URLSpec

Functions

def _create_signature_v1
def _create_signature_v2
def _decode_signed_value_v1
def _decode_signed_value_v2
def _has_stream_request_body
def _time_independent_equals
def _unquote_or_none
def addslash
def asynchronous
def authenticated
def create_signed_value
def decode_signed_value
def removeslash
def stream_request_body

Variables

 _auto_finish
tuple _signed_value_version_re = re.compile(br"^([1-9][0-9]*)\|(.*)$")
 _time_independent_equals = hmac.compare_digest
int DEFAULT_SIGNED_VALUE_MIN_VERSION = 1
int DEFAULT_SIGNED_VALUE_VERSION = 2
int MAX_SUPPORTED_SIGNED_VALUE_VERSION = 2
int MIN_SUPPORTED_SIGNED_VALUE_VERSION = 1
 url = URLSpec

Function Documentation

def rosbridge_tools.tornado.web._create_signature_v1 (   secret,
  parts 
) [private]

Definition at line 3004 of file web.py.

def rosbridge_tools.tornado.web._create_signature_v2 (   secret,
  s 
) [private]

Definition at line 3011 of file web.py.

def rosbridge_tools.tornado.web._decode_signed_value_v1 (   secret,
  name,
  value,
  max_age_days,
  clock 
) [private]

Definition at line 2939 of file web.py.

def rosbridge_tools.tornado.web._decode_signed_value_v2 (   secret,
  name,
  value,
  max_age_days,
  clock 
) [private]

Definition at line 2968 of file web.py.

Definition at line 1526 of file web.py.

Definition at line 2842 of file web.py.

None-safe wrapper around url_unescape to handle unamteched optional
groups correctly.

Note that args are passed as bytes so the handler can decide what
encoding to use.

Definition at line 3017 of file web.py.

Use this decorator to add a missing trailing slash to the request path.

For example, a request to ``/foo`` would redirect to ``/foo/`` with this
decorator. Your request handler mapping should use a regular expression
like ``r'/foo/?'`` in conjunction with using the decorator.

Definition at line 1555 of file web.py.

Wrap request handler methods with this if they are asynchronous.

This decorator is unnecessary if the method is also decorated with
``@gen.coroutine`` (it is legal but unnecessary to use the two
decorators together, in which case ``@asynchronous`` must be
first).

This decorator should only be applied to the :ref:`HTTP verb
methods <verbs>`; its behavior is undefined for any other method.
This decorator does not *make* a method asynchronous; it tells
the framework that the method *is* asynchronous.  For this decorator
to be useful the method must (at least sometimes) do something
asynchronous.

If this decorator is given, the response is not finished when the
method returns. It is up to the request handler to call
`self.finish() <RequestHandler.finish>` to finish the HTTP
request. Without this decorator, the request is automatically
finished when the ``get()`` or ``post()`` method returns. Example::

   class MyRequestHandler(web.RequestHandler):
       @web.asynchronous
       def get(self):
          http = httpclient.AsyncHTTPClient()
          http.fetch("http://friendfeed.com/", self._on_download)

       def _on_download(self, response):
          self.write("Downloaded!")
          self.finish()

.. versionadded:: 3.1
   The ability to use ``@gen.coroutine`` without ``@asynchronous``.

Definition at line 1434 of file web.py.

Decorate methods with this to require that the user be logged in.

If the user is not logged in, they will be redirected to the configured
`login url <RequestHandler.get_login_url>`.

If you configure a login url with a query parameter, Tornado will
assume you know what you're doing and use it as-is.  If not, it
will add a `next` parameter so the login page knows where to send
you once you're logged in.

Definition at line 2581 of file web.py.

def rosbridge_tools.tornado.web.create_signed_value (   secret,
  name,
  value,
  version = None,
  clock = None 
)

Definition at line 2855 of file web.py.

def rosbridge_tools.tornado.web.decode_signed_value (   secret,
  name,
  value,
  max_age_days = 31,
  clock = None,
  min_version = None 
)

Definition at line 2898 of file web.py.

Use this decorator to remove trailing slashes from the request path.

For example, a request to ``/foo/`` would redirect to ``/foo`` with this
decorator. Your request handler mapping should use a regular expression
like ``r'/foo/*'`` in conjunction with using the decorator.

Definition at line 1532 of file web.py.

Apply to `RequestHandler` subclasses to enable streaming body support.

This decorator implies the following changes:

* `.HTTPServerRequest.body` is undefined, and body arguments will not
  be included in `RequestHandler.get_argument`.
* `RequestHandler.prepare` is called when the request headers have been
  read instead of after the entire body has been read.
* The subclass must define a method ``data_received(self, data):``, which
  will be called zero or more times as data is available.  Note that
  if the request has an empty body, ``data_received`` may not be called.
* ``prepare`` and ``data_received`` may return Futures (such as via
  ``@gen.coroutine``, in which case the next method will not be called
  until those futures have completed.
* The regular HTTP method (``post``, ``put``, etc) will be called after
  the entire body has been read.

There is a subtle interaction between ``data_received`` and asynchronous
``prepare``: The first call to ``data_recieved`` may occur at any point
after the call to ``prepare`` has returned *or yielded*.

Definition at line 1498 of file web.py.


Variable Documentation

Definition at line 1466 of file web.py.

tuple rosbridge_tools::tornado::web::_signed_value_version_re = re.compile(br"^([1-9][0-9]*)\|(.*)$")

Definition at line 2895 of file web.py.

Definition at line 2840 of file web.py.

Definition at line 133 of file web.py.

Definition at line 125 of file web.py.

Definition at line 117 of file web.py.

Definition at line 109 of file web.py.

Definition at line 2836 of file web.py.



rosbridge_tools
Author(s): Jonathan Mace
autogenerated on Sat Dec 27 2014 11:26:00