gossip
gossip copied to clipboard
Hooking and signaling library for python
The usage should be something like: ```python operation_context = gossip.define_contextback('name', args=(...), tags=..., ....) ``` And then for registration ``` @operation_context.register @contextmanager def my_contextmanager(arg1, arg2): ... yield .... ```
There is currently TODO in the code for optimazing `Group.unregister_token()` method. https://github.com/getslash/gossip/blob/5a09968bb3cab92cc0bd51a1bcaccebf7cc667d3/gossip/groups.py#L130 (The comment will be removed from the code in my next PR).
Hi Rotem, Thanks for developing Gossip. I love it! I'm currently using it as part of a framework I'm writing, so I'm pre-defining a lot of hooks I use in...
how can I use gossip for objectmethods ``` >>> import gossip >>> class MyClass(object): ... def trigger(self): ... gossip.trigger('my_hook') ... @gossip.register('my_hook') ... def my_func(self): ... print 42 ... >>> my_object...