class documentation

class LocalManager: (source)

View In Hierarchy

Manage releasing the data for the current context in one or more :class:`Local` and :class:`LocalStack` objects. This should not be needed for modern use cases, and may be removed in the future. :param locals: A local or list of locals to manage. .. versionchanged:: 2.0 ``ident_func`` is deprecated and will be removed in Werkzeug 2.1. .. versionchanged:: 0.7 The ``ident_func`` parameter was added. .. versionchanged:: 0.6.1 The :func:`release_local` function can be used instead of a manager.

Method __init__ Undocumented
Method __repr__ Undocumented
Method cleanup Release the data in the locals for this context. Call this at the end of each request or use :meth:`make_middleware`.
Method make_middleware Wrap a WSGI application so that local data is released automatically after the response has been sent for a request.
Method middleware Like :meth:`make_middleware` but used as a decorator on the WSGI application function.
Class Variable __slots__ Undocumented
Instance Variable locals Undocumented

Undocumented

def __repr__(self) -> str: (source)

Undocumented

def cleanup(self): (source)

Release the data in the locals for this context. Call this at the end of each request or use :meth:`make_middleware`.

def make_middleware(self, app: WSGIApplication) -> WSGIApplication: (source)

Wrap a WSGI application so that local data is released automatically after the response has been sent for a request.

def middleware(self, func: WSGIApplication) -> WSGIApplication: (source)

Like :meth:`make_middleware` but used as a decorator on the WSGI application function. .. code-block:: python @manager.middleware def application(environ, start_response): ...

__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented