jacinle.web.app package

jacinle.web.app.route(regex)[source]
jacinle.web.app.make_app(modules, settings)[source]
jacinle.web.app.get_app()[source]
class jacinle.web.app.JacApplication(*args, **kwargs)[source]

Bases: tornado.web.Application

get_session(request_handler)[source]
class jacinle.web.app.JacRequestHandler(*args, **kwargs)[source]

Bases: tornado.web.RequestHandler

finish(*args, **kwargs)[source]

Finishes this response, ending the HTTP request.

Passing a chunk to finish() is equivalent to passing that chunk to write() and then calling finish() with no arguments.

Returns a .Future which may optionally be awaited to track the sending of the response to the client. This .Future resolves when all the response data has been sent, and raises an error if the connection is closed before all data can be sent.

Changed in version 5.1: Now returns a .Future instead of None.

get_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]

Returns the value of the argument with the given name.

If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.

If the argument appears in the request more than once, we return the last value.

This method searches both the query and body arguments.

get_body_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]

Returns the value of the argument with the given name from the request body.

If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.

If the argument appears in the url more than once, we return the last value.

New in version 3.2.

get_query_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]

Returns the value of the argument with the given name from the request query string.

If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.

If the argument appears in the url more than once, we return the last value.

New in version 3.2.

get_template_namespace()[source]

Returns a dictionary to be used as the default template namespace.

May be overridden by subclasses to add or modify values.

The results of this method will be combined with additional defaults in the tornado.template module and keyword arguments to render or render_string.

initialize()[source]
on_body_finish()[source]
on_finish()[source]

Called after the end of a request.

Override this method to perform cleanup, logging, etc. This method is a counterpart to prepare. on_finish may not produce any output, as it is called after the response has been sent to the client.

save_session()[source]

Submodules

jacinle.web.app.application module