Permalink
Browse files

Initial commit

  • Loading branch information...
Ask Solem Ask Solem Hoel
Ask Solem authored and Ask Solem Hoel committed Nov 4, 2009
1 parent a7329b3 commit 7b3fc0e4cad49b848dd30d68054f0199c1ac7d28
Showing with 27 additions and 5 deletions.
  1. +1 −1 AUTHORS
  2. +24 −2 README
  3. +1 −1 TODO
  4. +1 −1 setup.py
View
@@ -1 +1 @@
-George Constanza <i-m-too-stupid-to-change@thedefaults.org>
+Ask Solem <askh@opera.com>
View
26 README
@@ -7,7 +7,10 @@ ghettoq - Redis based ghetto queue
Introduction
============
-.. Please write an introduction to your package here.
+ghettoq is a Redis based ghetto queue, used to implement Redis support for
+`carrot`_
+
+.. _`carrot`: http://pypi.python.org/pypi/carrot
Installation
============
@@ -34,4 +37,23 @@ by doing the following,::
Examples
========
-.. Please write some examples using your package here.
+ >>> from ghettoq.messaging import Queue
+ >>> import simplejson
+
+ >>> # Publishing messages
+ >>> q = Queue(name="tasks")
+ >>> payload = {"name": "George Constanza"}
+ >>> q.put(simplejson.dumps(payload), content_type="application/json",
+ content_encoding="utf-8")
+
+ >>> # Consuming messages
+ >>> message = q.get()
+ >>> message
+ Message(content_encoding="application/json", content_encoding="utf-8",
+ delivery_tag="f3f8e1f6-218b-4dde-8460-7a3731e70bb0")
+ >>> message.payload
+ '{"name": "George Constanza"}'
+
+ # Empty yields None
+ >>> q.get()
+ raises Queue.Empty
View
2 TODO
@@ -1 +1 @@
-See http://bugs.opera.com/browse/OPAL
+See http://github.com/ask/ghettoq/issues/
View
@@ -78,10 +78,10 @@ def is_unwanted_file(filename):
zip_safe=False,
test_suite="nose.collector",
install_requires=[
+ "redis",
],
classifiers=[
"Development Status :: 4 - Beta",
- "Framework :: Django",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Intended Audience :: Developers",

0 comments on commit 7b3fc0e

Please sign in to comment.