Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Making postgres listen/notify easier.
Python
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
sql
tests
trunk
.gitignore
.travis.yml
AUTHORS
LICENSE
MANIFEST.in
README.rst
requirements.txt
setup.py
tox.ini

README.rst

Trunk

Installing

To install :

pip install trunk

Usage

Trunk tries to be as simple as possible

t = Trunk("postgres://localhost/noclue")
for channel, payload in t.notifications("clues"):
    print channel, payload
t.notify("clues", "chandelier")
t.unlisten("clues")

Celery

Trunk provides a Kombu transport, that allows you to use trunk with Celery, to do so, configure Celery with :

BROKER_URL = 'trunk.transport.Transport://localhost/database'

Setup

You will need to create a new table and add two functions to your database. See table.sql and ddl.sql.

Something went wrong with that request. Please try again.