Skip to main content

Simple callbacks using decorators

Project description

Callbacks lets you use decorator syntax to set callbacks on methods or functions.

[![Build Status](https://secure.travis-ci.org/14rcole/callbacks.svg?branch=master)](https://travis-ci.org/14rcole/callbacks)
[![Coverage Status](https://coveralls.io/repos/github/14rcole/callbacks/badge.svg?branch=master)](https://coveralls.io/github/14rcole/callbacks?branch=master)

```python
from callbacks import supports_callbacks

def callback():
print "Polly!"

@supports_callbacks
def target():
print "hello",

target.add_callback(callback)

target() # prints "hello Polly!"
```



Project details


Download files

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

Files for callbacks, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size callbacks-0.3.0-py2-none-any.whl (5.7 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size callbacks-0.3.0.tar.gz (9.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page