AWS SQS broker for wiji. Wiji<https://github.com/komuw/wiji> is an asyncio distributed task processor/queue.
Project description
wijisqs
wiji is an asyncio distributed task processor/queue.
wijisqs on the other hand, is an AWS SQS broker for wiji
Installation
pip install wijisqs
Usage
1. As a library
import os
import wiji
import wijisqs
import asyncio
broker = wijisqs.SqsBroker(
aws_region_name="aws_region_name",
aws_access_key_id=os.environ.get("aws_access_key_id"),
aws_secret_access_key=os.environ.get("aws_secret_access_key"),
)
class AdderTask(wiji.task.Task):
the_broker = broker
queue_name = "AdderTaskQueue1"
async def run(self, a, b):
result = a + b
print("\nresult: {0}\n".format(result))
return result
# queue some tasks
myAdderTask = AdderTask()
myAdderTask.synchronous_delay(a=4, b=37)
myAdderTask.synchronous_delay(a=67, b=847)
# run the workers
worker = wiji.Worker(the_task=myAdderTask)
asyncio.run(worker.consume_tasks())
For extended documentation, see the wiji documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wijisqs-0.4.0b1.tar.gz
(12.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
wijisqs-0.4.0b1-py3-none-any.whl
(11.1 kB
view details)
File details
Details for the file wijisqs-0.4.0b1.tar.gz.
File metadata
- Download URL: wijisqs-0.4.0b1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c58d0becaa935fee99825fd9139c440fba99f1610b67b95d5a2c15bcf1d22b7
|
|
| MD5 |
c08f034a268ab3c3b4d0a3d8e6281ff7
|
|
| BLAKE2b-256 |
612ce60ec40e134909065de8093120f8f563514cb830d7f01b2adc1f3b621eee
|
File details
Details for the file wijisqs-0.4.0b1-py3-none-any.whl.
File metadata
- Download URL: wijisqs-0.4.0b1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f063915ad588c292b34e035bd12ff618f71eede6d525daa180df6f41012980f
|
|
| MD5 |
182ccb3ef049fc713622f305aed82454
|
|
| BLAKE2b-256 |
024a43b4aca167934840f10e637350c14a41ebc4d83983fd0c4430c480ed44b7
|