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.0.tar.gz (15.8 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.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: workerlib-0.5.0.tar.gz
  • Upload date:
  • Size: 15.8 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.0.tar.gz
Algorithm Hash digest
SHA256 c5b09eb58ad7812d93f30d3924c5895430b55f847440be0878676969d0eebb28
MD5 e87b00697cf3418aea027ef1ff585dc3
BLAKE2b-256 925ba55c7fc3847e1d8c55650a4116ca3a15a85eba4c396c879bf2f045138759

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: workerlib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61d4e8dafad891081bed5b5213f95a3234058d2e3e20c8e401b97a7824e89ab5
MD5 2fee73a884cc2e08934ab2bf515577ff
BLAKE2b-256 0ed05ba0c7ef8a6aa8a150f29b536d3283615835c9e0207c719b685e84eb7472

See more details on using hashes here.

Provenance

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