This module implements thread-local utilities.
A container for thread-local objects.
Attributes are assigned or retrieved using the current thread.
Acts as a proxy for a local object.
Forwards all operations to a proxied object. The only operations not supported for forwarding are right handed operands and any kind of assignment.
from webapp2_extras import Local l = Local() # these are proxies request = l('request') user = l('user')
Whenever something is bound to l.user or l.request the proxy objects
will forward all operations. If no object is bound a
will be raised.
route_kwargs = LocalProxy(lambda: webapp2.get_request().route_kwargs)