Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A pubsubhubbub publisher implementation
Failed to load latest commit information.
bin Better logging and exception logging, message sending retry and rabbi…
etc Adds matched and non-matched filtering of messages
other Yanked a bunch of code, some bugfixes, and a bunch of cleanup accordi…
tests Yanked a bunch of code, some bugfixes, and a bunch of cleanup accordi…
.gitignore Alpha release A bunch of bug fixes and configuration file cleanup config file adjustments Yanked a bunch of code, some bugfixes, and a bunch of cleanup accordi… Yanked a bunch of code, some bugfixes, and a bunch of cleanup accordi…


A PubSubHubBub Publisher implementation in Python

Why PubSubHubBub?

We wanted to use a defined spec with easy to use clients, and PubSubHubBub fit the bill nicely.

Why implement an external publisher?

The original impetus for this project is to adapt an existing piece of software to sending notifications without laying the job of managing those notifications on said implementation. Because PubSubHubBub requires an ATOM feed, we didn\'t want the original software from having to worry about completely unrelated functionality. Additionally, this route buys us a lot of flexibility.


  • argparse
  • feedgenerator
  • httplib2
  • redis
  • webob
  • eventlet
  • daemon
  • pubsubhubbub_publish (available under the publisher_clients folder after checking out the project from Google Code NOTE: the plan is to replace this dependency later with our implementation
  • carrot (if using Rabbit)
  • routes

Setting up the hub

Download the Google App Engine SDK for Linux and add it to your path

Then checkout the reference hub.

svn checkout pubsubhubbub-read-only

Install pubsubhubbub_publisher for python

cd pubsubhubbub-read-only/publisher_clients/python
sudo python install

Start the hub

cd pubsubhubbub-read-only hub/ -p<port number specified in yagi.conf>

Setting up Yagi

After setting up the hub, above

cd yagi
# edit yagi.conf, setting up as appropriate
# Take care to update the feed_host variable in the event_feed
# section as it will be the IP address presented in the feed. Otherwise
# Yagi will attempt to infer it, and it doesn't seem to be all that
# successful at it.
sudo cp yagi.conf /etc
sudo python install

Testing subscriptions

cd yagi

# You'll want to run this in multiple screen windows or terminal sessions, as the callback process
# won't daemonize

python subscriber/ <sub_port>
python subscriber/ <topic> <callback> <hub>

# I usually load other/ in an iPython session
cd other
import push_rabbit

# the cast below is assuming you setting up yagi to listen on a queue named 'notifications.warn'
push_rabbit.cast(dict(a=3), 'instance', 'notifications', 'warn')

You should see XML content being pushed to your window running, above.

Something went wrong with that request. Please try again.