Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyberdelia/trunk

Making postgres listen/notify easier.
https://github.com/cyberdelia/trunk

Last synced: 5 days ago
JSON representation

Making postgres listen/notify easier.

Awesome Lists containing this project

README

        

=====
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 `_.