plastic.message — Request/response messages

class plastic.message.Request(environ, app, populate_request=True, shallow=False)

Bases: werkzeug.wrappers.Request

The richier subclass of werkzeug.wrappers.Request.

Parameters:
  • environ (collections.Mapping) – the wsgi environ to initialize with
  • app (BaseApp) – the request app instance
  • endpoint (basestring) – the requested endpoint
app = None

(BaseApp) The requested application instance.

bound_routing_map = None

(werkzeug.routing.MapAdapter) The bound url adapter.

build_url(endpoint, _method=None, _external=False, **values)

Builds an url for the given endpoint and other editional options.

It generates a relative path by default. Use _external=True when an absolute url is needed.

Parameters:
  • endpoint (basestring) – the endpoint of the url to build
  • _method (basestring) – an optional HTTP method to disambiguate the rule
  • _external (bool) – build the absolute url instead of relative url
  • **values – the parameter values for the endpoint
context = None

(Context) The context storage, which is a kind of dict. Keys can be accessed as like attributes.

endpoint = None

(basestring) The requested endpoint.

endpoint_values = None

(collections.Mapping) The pararmeter values of routed endpoint.

session

(collections.MutableMapping) The session storage. If this value has changed in view functions the state will be kept in future requests of the same session as well.

class plastic.message.Response(response=None, status=None, headers=None, mimetype=None, content_type=None, direct_passthrough=False)

Bases: werkzeug.wrappers.Response

The richier subclass of werkzeug.wrappers.Response.

Project Versions

Previous topic

plastic.app — Application factories

Next topic

plastic.context — Contexts

This Page