Skip to main content

ghettoq - Ghetto Queue using Redis or Django Models.

version:

0.4.1

Introduction

ghettoq is a ghetto queue framework, used to implement Redis and Django database support for carrot

Installation

You can install ghettoq either via the Python Package Index (PyPI) or from source.

To install using pip,:

$ pip install ghettoq

To install using easy_install,:

$ easy_install ghettoq

If you have downloaded a source tarball you can install it by doing the following,:

$ python setup.py build
# python setup.py install # as root

Examples

>>> from ghettoq.simple import Connection
>>> import simplejson
>>> conn = Connection("redis", host="localhost", database=1)
>>> # Publishing messages
>>> q = conn.Queue("tasks")
>>> payload = {"name": "George Constanza"}
>>> q.put(simplejson.dumps(payload))
>>> # Consuming messages
>>> message = q.get()
>>> simplejson.loads(message)
{"name": "George Constanza"}

# Empty raises ghettoq.messaging.Empty >>> q.get() Empty

Using Django database support

If settings is already configured you don’t have to specify any connection options.

>>> from ghettoq.simple import Connection
>>> conn = Connection("database")
>>> queue = conn.Queue(name="tasks")
>>> queue.put("To whom it may concern")
>>> queue.get()
"To whom it may concern"

Using MongoDB support

If settings is already configured you don’t have to specify any connection options. The settings attrs used are:

  • BROKER_HOST: ‘127.0.0.1’ if not set

  • BROKER_PORT: 27017 if not set

  • BROKER_VHOST (Database Name): ‘ghettoq’ if not set

  • Collection name: “messages”… should be added support for BROKER_COL settings var?

    >>> from ghettoq.simple import Connection
    
    >>> conn = Connection("mongodb")
    >>> queue = conn.Queue(name="tasks")
    >>> queue.put("To whom it may concern")
    >>> queue.get()
    "To whom it may concern"
    

License

This software is licensed under the New BSD License. See the LICENSE file in the top distribution directory for the full license text.

Metadata

Release files for ghettoq 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghettoq 0.4.1
File Size Uploaded Provenance Actions
ghettoq-0.4.1.tar.gz 35.4 kB Without provenance Details for ghettoq-0.4.1.tar.gz

Release files / ghettoq-0.4.1.tar.gz

Download URL ghettoq-0.4.1.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba2b4825134656bbe4071d9a5414e5e3ef9688a1947bae81782c08e7265e5ea6
BLAKE2b-256 checksum
How to use checksums
6abf27004cd39d4945507c6f62e1724120cafd1e5b4a8257304de63779902202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ghettoq 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page