Async Redis queue for Python.
Project description
repid
Repid is a job queuing library for Python with focus on simplicity.
pip install repid
Quickstart
Make sure Redis is running, then start 2 processes/containers with code as below.
On producer side:
import repid
import asyncio
from aioredis import Redis
myredis = Redis(host="localhost", port=6379, db=0, decode_responses=True)
myrepid = repid.Repid(myredis)
async def main():
await myrepid.enqueue("my_first_job")
asyncio.run(main())
On consumer side:
import repid
import asyncio
from aioredis import Redis
myredis = Redis(host="localhost", port=6379, db=0, decode_responses=True)
myworker = repid.Worker(myredis)
@myworker.actor()
async def my_first_job():
return "Hello Repid!"
asyncio.run(myworker.run_forever())
Check out user guide to learn more!
License
Repid is licensed under the MIT. Please see License.md for more information.
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
repid-0.2.0.tar.gz
(7.8 kB
view hashes)
Built Distribution
repid-0.2.0-py3-none-any.whl
(8.9 kB
view hashes)