Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberdelia/trunk
Making postgres listen/notify easier.
https://github.com/cyberdelia/trunk
Last synced: about 1 month ago
JSON representation
Making postgres listen/notify easier.
- Host: GitHub
- URL: https://github.com/cyberdelia/trunk
- Owner: cyberdelia
- License: mit
- Created: 2012-12-31T09:30:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T11:34:42.000Z (over 7 years ago)
- Last Synced: 2024-09-17T15:57:00.553Z (3 months ago)
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 59
- Watchers: 7
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
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 `_.