Metadata-Version: 2.4
Name: vercel-dramatiq-bundle
Version: 0.7.0
Summary: Dramatiq broker backed by Vercel Queue Service
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: dramatiq<3,>=2.2
Requires-Dist: vercel-cache-bundle>=0.7.1
Requires-Dist: vercel-internal-shared-vendored-deps>=0.1.0
Requires-Dist: vercel-queue-bundle>=0.7.1
Description-Content-Type: text/markdown

# vercel-dramatiq-bundle

This is a version of `vercel-dramatiq` with third-party dependencies bundled. For normal use, install the unbundled `vercel-dramatiq` package instead: https://pypi.org/project/vercel-dramatiq/

# vercel-dramatiq

Dramatiq broker backed by Vercel Queue Service.

```python
import dramatiq

from vercel.integrations.dramatiq import install_vercel_dramatiq_integration

install_vercel_dramatiq_integration()


@dramatiq.actor
def send_email(user_id: str) -> None: ...
```

The installer sets Dramatiq's global broker to `VercelQueueBroker` when no
broker has been configured yet. Pass `set_default_broker=False` to opt out, or
call `dramatiq.set_broker(VercelQueueBroker(...))` directly when you need to
construct the broker yourself.

The broker uses push delivery when `VERCEL` is truthy in the environment and
poll delivery otherwise. Pass `poll=False` or `poll=True` to
`install_vercel_dramatiq_integration(...)` to force a mode, or pass the same
option to `VercelQueueBroker(...)` when constructing the broker yourself.

For Vercel push delivery, configure queue triggers for each declared queue and
its Dramatiq delay queue. For example, the `default` Dramatiq queue maps to both
the `default` topic and the sanitized `default_DDQ` delay topic. Retries and
delayed messages are delivered through the delay queue topic.

Set `VERCEL_DRAMATIQ_DEBUG=1` to enable debug logging for the integration and
Dramatiq worker loggers.

The package is standalone and depends on `vercel-queue` and Dramatiq.
