Local objects cannot manage themselves. For that you need a local manager. You can pass a local manager multiple locals or add them later by appending them to manager.locals. Everytime the manager cleans up it, will clean up all the data left in the locals for this context.
The ident_func parameter can be added to override the default ident function for the wrapped locals.
Changed in version 0.6.1: Instead of a manager the
release_local()function can be used as well.
Changed in version 0.7: ident_func was added.
||Manually clean up the data in the locals for this context.|
||Return the context identifier the local objects use internally for this context.|
||Wrap a WSGI application so that cleaning up happens after request end.|
||Like make_middleware but for decorating functions.|