Async queue for Python.
Project description
repid
Repid is a job queuing library for Python with focus on simplicity.
pip install repid
Quickstart
Here is how the easiest example of producer-consumer application can look like.
Producer:
import asyncio
from repid import Repid, Job
Repid("amqp://user:password@localhost:5672")
async def main():
myjob = Job(name="awesome_job")
await myjob.queue.declare()
await myjob.enqueue()
asyncio.run(main())
Consumer:
import asyncio
from repid import Repid, Worker, Job
Repid("amqp://user:password@localhost:5672")
myworker = Worker()
@myworker.actor()
async def awesome_job() -> None:
print("Hello async jobs!")
await do_some_async_stuff()
asyncio.run(myworker.run())
Check out user guide to learn more!
License
Repid is distributed under the terms of the MIT license. Please see License.md for more information.
Repid's logo is distributed under the terms of the CC BY-NC 4.0 license. It was originally created by ari_the_crow_.
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-1.0.0b4.tar.gz
(21.1 kB
view hashes)
Built Distribution
repid-1.0.0b4-py3-none-any.whl
(25.5 kB
view hashes)