SessionPatchRegistry#
- class glue.config.SessionPatchRegistry#
Bases:
RegistryA registry that allows in-place patch of the session file
Methods Summary
__call__([priority])This is provided so that registry instances can be used as decorators.
add(function[, priority])Add a new plugin for providing custom in-place session patch.
Methods Documentation
- __call__(priority=0)#
This is provided so that registry instances can be used as decorators. The decorators should add the decorated code object to the registry, and return the original function
- add(function, priority=0)#
Add a new plugin for providing custom in-place session patch.
Plugins take the form of functions that take one argument: the session object (a dictionary). It should returns None.
- Parameters:
- functioncallable
The function apply the patch in-place
- priorityint, optional
Set this to a higher number if multiple plugins are present and you want your plugin to take precedence over another.