Simple python message queue framework is ready to serve.
Project description
simple-pymq
Simple python message queue framework is ready to serve.
Installation
pip install simple-pymq
Usage
Simple message queue pipeline in memory:
import asyncio
from simple_pymq import (
PrintConsumer,
QueueBroker,
SimpleMessageQueue,
TimeCounterProducer,
)
async def main():
q = QueueBroker(maxsize=32)
p = TimeCounterProducer(
count_seconds=1.0, max_produce_count=3, put_value="Message here."
)
c = PrintConsumer(max_consume_count=3)
mq = SimpleMessageQueue()
await mq.run(broker=q, producers=p, consumers=c)
print("All tasks done!")
asyncio.run(main())
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
simple_pymq-0.2.0.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for simple_pymq-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69c1edc4e1cb044b85cec9514d4fc4397d017e2ac04c284d087a97b3db23360f |
|
MD5 | 6880c515f6d47ed20c703650695b1ee7 |
|
BLAKE2b-256 | 8313d78e01d64d7bf811d9268d0124f222020566db67f6f39aea49d1e24f5e46 |