Skip to main content

aioamqp-consumer-best

PyPI version PyPI - Python Version Build Status codecov

Usage

import asyncio
from typing import List

from aioamqp_consumer_best import (
    ConnectionParams,
    Consumer,
    Exchange,
    Message,
    ProcessBulk,
    Queue,
    QueueBinding,
    ToBulks,
    load_json,
)


async def callback(messages: List[Message]) -> None:
    print(messages)


consumer = Consumer(
    middleware=(
        load_json
        | ToBulks(max_bulk_size=10, bulk_timeout=3.0)
        | ProcessBulk(callback)
    ),
    prefetch_count=10,
    queue=Queue(
        name='test-queue',
        bindings=[
            QueueBinding(
                exchange=Exchange('test-exchange'),
                routing_key='test-routing-key',
            ),
        ],
    ),
    connection_params=[  # Round robin
        ConnectionParams(),
        ConnectionParams.from_string('amqp://user@rmq-host:5672/'),
    ],
)

asyncio.run(consumer.start())

Metadata

Release files for aioamqp-consumer-best 2.4.0

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

Source distribution (sdist)

Source distribution for aioamqp-consumer-best 2.4.0
File Size Uploaded Provenance Actions
aioamqp-consumer-best-2.4.0.tar.gz 11.4 kB Without provenance Details for aioamqp-consumer-best-2.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aioamqp-consumer-best 2.4.0
File Interpreter ABI Platform Actions
aioamqp_consumer_best-2.4.0-py3-none-any.whl Python 3 none any Details for aioamqp_consumer_best-2.4.0-py3-none-any.whl

Total release size: 22.6 kB

Release files / aioamqp-consumer-best-2.4.0.tar.gz

Download URL aioamqp-consumer-best-2.4.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0bb6cff9c369c9a501bbceb42c78ea9714d6e1cc19281f011a246eec91f7bb03
BLAKE2b-256 checksum
How to use checksums
8fcf3a4b94c2295aac02a1552906be458d362c52b660ca638c7e563cef7993f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / aioamqp_consumer_best-2.4.0-py3-none-any.whl

Download URL aioamqp_consumer_best-2.4.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
137be99e3fd5dcbc5409dcb5b0d4795ff7d3e20470704f7c1fe27da813f3d176
BLAKE2b-256 checksum
How to use checksums
1d17026450f843518f298aaaa95965c316815ddd5b038e42188274e6c270342f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for aioamqp-consumer-best 2.4.0

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