Skip to main content

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)

Uploaded Source

Built Distribution

simple_pymq-0.2.0-py3-none-any.whl (10.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