Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A very simple hook system for zope application by Makina-Corpus.

Project Description


Hook is a system based on zope.event.

To make a method hookable, you first need to define an event that provide at least IHookEvent.

Next you can use collective.hook.decorator.hook(MyEventClassHook) to decorate your method.

Define a handler as usual:

for=”my.module.IMyHook” handler=”my.module.my_hook” />

Warning: This event is triggered two times. So you need in your hook to check the value of before boolean attribute or after boolean attribute. The event store the result of the call in the attribute ‘returned_value’

There are also hooked_args and hooked_kwargs if you want to play with arguments.






1.0b1 (2010-05-27)

  • Initial release
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (19.6 kB) Copy SHA256 Checksum SHA256 Source May 27, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting