This library, written in Python, allows the programmer to perform event lifecycle oriented hooking. Typically, an event has a beginning and an end, therefore a lifecycle. A callback function called a hook can be bound to an arbitrary stage of an event's lifecycle.
By default, a hook is bound to the beginning of an event. More specifically, the spec parameter defaults to ENTER. The spec parameter can accept ENTER, LEAVE, and ANY.
In the following script, we will bind a hook to an event, then pass data to the hook while notifying it of the beginning of that event:
The programmer may need to temporarily freeze the hooking session, and in this case no hook will be called when an event occurs: