Skip to main content

PyPI version GitHub Build PyPI - Python Version

Stack:

Installation

pip install rabbitmq-clients

Usage

Run rabbitMQ on your computer.

Producer

import asyncio
import json

from rabbitmq_clients import RabbitProducer

if __name__ == "__main__":
    producer = RabbitProducer(
        host='localhost',
        login='test',
        password='test',
    )
    data = {"result": True}
    asyncio.run(
        producer.publish(
            json.dumps(data),
            queue_name='test_queue_name',
        )
    )
import asyncio

from rabbitmq_clients import RabbitConsumer, QueueDTO
from rabbitmq_clients.core.types import JSON


async def show_decoded_result(result: JSON):
    print(result)


async def show_encoded_result(result: JSON):
    print(result.body)


if __name__ == "__main__":
    consumer = RabbitConsumer(
        host='localhost',
        login='test',
        password='test',
    )
    first_queue = QueueDTO(
        name='decoded_result',
        callback=show_decoded_result,
    )
    second_queue = QueueDTO(
        name='encoded_result',
        callback=show_encoded_result,
        auto_decode=False,
    )
    consumer.add_queue(first_queue)
    consumer.add_queue(second_queue)

    try:
        asyncio.run(consumer.consume_all())
    except KeyboardInterrupt:
        pass

Metadata

Release files for rabbitmq-clients 0.1.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rabbitmq-clients 0.1.22
File Size Uploaded Provenance Actions
rabbitmq_clients-0.1.22.tar.gz 5.3 kB Without provenance Details for rabbitmq_clients-0.1.22.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rabbitmq-clients 0.1.22
File Interpreter ABI Platform Actions
rabbitmq_clients-0.1.22-py3-none-any.whl Python 3 none any Details for rabbitmq_clients-0.1.22-py3-none-any.whl

Total release size: 12.7 kB

Release files / rabbitmq_clients-0.1.22.tar.gz

Download URL rabbitmq_clients-0.1.22.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
42c809d5768763c0d7c33513e22647962864c8513df279f1eed10168dc0fb5d9
BLAKE2b-256 checksum
How to use checksums
389f127b74945b51cdf02c2777c1f8a6410d3e96013a8907e19c1d6198ad1805
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure

Release files / rabbitmq_clients-0.1.22-py3-none-any.whl

Download URL rabbitmq_clients-0.1.22-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
daf9be86f1e38b83755127083ff4e684ed02affbfabc295eb0b8bec0e6d5e16f
BLAKE2b-256 checksum
How to use checksums
12c49153767a21fea7332574a9c9d44abd177b49c241213837ab90ee94b05bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure

Security for rabbitmq-clients 0.1.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page