Skip to main content

A simple queue service using Amazon SQS and boto

Project description

pysqes
======

Simple queue service for python using SQS and boto.

Usage
======
In order to create a task you can use the SQSTask class to create
an instance that include a function decorator which can be sent
to the queue when you run the delay method that will be added
to the function. The delay function takes the parameters that will
be used by the worker when it actually executes the task.

```python
from boto.sqs.connection import SQSConnection

from pysqes.task import SQSTask

conn = SQSConnection('ACCESS_KEY', 'SECRETE_KEY')
task = SQSTask(conn)


@task.task
def add(a, b):
return a + b

# this will submit a job to the queue
add.delay(1, 3)
```

You can run the task by using the work method included in the
SQSWorker class, all you need to do is create a worker instance.
```python
from boto.sqs.connection import SQSConnection

from pysqes.worker import SQSWorker

conn = SQSConnection('ACCESS_KEY', 'SECRETE_KEY')
worker = SQSWorker(conn)

worker.work()
```

Running the tests
======
If you are using python 2.7 you can run the unit tests by
using the new discover runner included in the unittest module:

```shell
python -m unittest discover -s tests
```

else you can just run each unit test individually.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysqes-0.1.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysqes-0.1.4.macosx-10.8-intel.exe (67.9 kB view details)

Uploaded Source

File details

Details for the file pysqes-0.1.4.tar.gz.

File metadata

  • Download URL: pysqes-0.1.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysqes-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0d26250ddf9ad95dfaed81fcd55c02b6d4f995a2d90569aa082974468f55716d
MD5 566f28332d4a07adaefa4a963d771ad0
BLAKE2b-256 139860eba9ede17c45aa830ab37a0f8e8cdc6b44be3d45d47f211440c103ca0b

See more details on using hashes here.

File details

Details for the file pysqes-0.1.4.macosx-10.8-intel.exe.

File metadata

File hashes

Hashes for pysqes-0.1.4.macosx-10.8-intel.exe
Algorithm Hash digest
SHA256 26f34ad4ddb1227008f0957b2eb0b65cf98e3a07ce6db2dc0b6faa4cef1ce422
MD5 e6184aee8301e1fd09d7bfab4ddcade9
BLAKE2b-256 d5685befe0329197ff30d1b0e494b7027a882665bd4268ecd77a451f183d5e77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page