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.3.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for simple_pymq-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d7195d92110a9f919d962044a2c678b4d9cb29fbd1e47a7d526abfc0df966d |
|
MD5 | dbcbadc99fbfa89bb8d896f8aa02ba9d |
|
BLAKE2b-256 | 82eb2575a765b2b036267eefa38bac59c27b9935c14c1f29b9233227d2dce3b1 |