Skip to main content

Async RabbitMQ worker utilities

Project description

WorkerLib

Асинхронные утилиты для работы с RabbitMQ: пул воркеров, очереди, retry, DLQ, вебхуки. Основа — aio-pika.

Установка

pip install workerlib

Python 3.10+.

Минимальный пример

import asyncio
from workerlib import WorkerPool

async def task_handler(data: dict) -> bool:
    print(data)
    return True

async def main():
    async with WorkerPool() as pool:
        pool.add_worker("tasks", task_handler)
        await pool.send("tasks", {"id": 1})

asyncio.run(main())

Документация

Полное описание, конфигурация, обработка ошибок, метрики, вебхуки и интеграция с FastAPI — в каталоге docs/:

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

workerlib-0.5.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

workerlib-0.5.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file workerlib-0.5.1.tar.gz.

File metadata

  • Download URL: workerlib-0.5.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for workerlib-0.5.1.tar.gz
Algorithm Hash digest
SHA256 9cf82f02547ac884d20035a0da5dfc2b4ca34dfc29b4f01f371e02d7ca619035
MD5 be5b0bcd9e58157b4c5d63a7a4b67291
BLAKE2b-256 4be322ffc59517917da4007984f5e8f26ea713d5aaca2744e6a0fbb7d4787322

See more details on using hashes here.

Provenance

The following attestation bundles were made for workerlib-0.5.1.tar.gz:

Publisher: publish.yml on ametist-dev/workerlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file workerlib-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: workerlib-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for workerlib-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cab1da0a887f4cdddaee92f86a9f7439559d48d2d0b8fabef68af0c0f971a5c
MD5 d42588bd9b2c240f46609ff1c61ba58c
BLAKE2b-256 7b9a34c28c9401818b82dcec10e2bef08ff848a18f4148c2ccb0c223299a61ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for workerlib-0.5.1-py3-none-any.whl:

Publisher: publish.yml on ametist-dev/workerlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page