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

concise publish/subscribe utility

Project Description

A concise Publish/Subscribe utility module. It supports both free-form signal names and a stricter style where signals are declared first. You can also mix them.

Usage

import smoke

class MyCls(smoke.Broker):
    appears = smoke.signal('appears')
    leaves = smoke.signal('leaves')

def say_hello(what):
    print("hello %s" % (what,))

def say_goodbye(what):
    print("good bye %s" % (what,))

# Using broker
o = MyCls()
o.subscribe("appears", say_hello)
o.publish("appears", what='world')

# Using declared signals
o = MyCls()
o.leaves.subscribe(say_goodbye)
o.leaves.publish(what='world')

# Mixing
o = MyCls()
o.subscribe("appears", say_hello)
o.appears.publish()
Release History

Release History

This version
History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

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
smoke-0.2.0.tar.gz (4.6 kB) Copy SHA256 Checksum SHA256 Source Dec 11, 2013

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