Skip to main content

Async Redis queue for Python.

Project description

repid

PyPI version codecov Tests PyPI pyversions Code style: black

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


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.1.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

repid-0.2.1-py3-none-any.whl (9.1 kB view hashes)

Uploaded Python 3

Supported by

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