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.4.6.tar.gz (15.5 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.4.6-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for workerlib-0.4.6.tar.gz
Algorithm Hash digest
SHA256 fd5544524110fc13277a975994885154e54d4cf320c3b37f59953c58b53d2022
MD5 3d955135a3aa04a63e55f9f44c9e1385
BLAKE2b-256 c46dd300a4941325e03f14647e17afd7cfd5478928f6a798ff5cb6357bd3d624

See more details on using hashes here.

Provenance

The following attestation bundles were made for workerlib-0.4.6.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.4.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for workerlib-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8cefe45e21f0586c5332958be5c9350a439061c55f10c8970d54b98db644dd5d
MD5 95c97c4e534f36c745d3005fda8dc5d2
BLAKE2b-256 cba95e1853fed431169cdbc8d42c32f719262014f97c0a6a04e6d72f1630b249

See more details on using hashes here.

Provenance

The following attestation bundles were made for workerlib-0.4.6-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