Metadata-Version: 2.3
Name: eventiq-asb
Version: 0.1.5
Summary: Azure Service Bus broker implementation for eventiq
Project-URL: Documentation, https://github.com/asynq-io/eventiq-asb#readme
Project-URL: Issues, https://github.com/asynq-io/eventiq-asb/issues
Project-URL: Source, https://github.com/asynq-io/eventiq-asb
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
Requires-Dist: azure-servicebus
Requires-Dist: eventiq>=1.1.2
Provides-Extra: aiohttp
Requires-Dist: aiohttp<4.0,>3.9.0; extra == 'aiohttp'
Description-Content-Type: text/markdown

![Tests](https://github.com/asynq-io/eventiq-asb/workflows/Tests/badge.svg)
![Build](https://github.com/asynq-io/eventiq-asb/workflows/Publish/badge.svg)
![License](https://img.shields.io/github/license/asynq-io/eventiq-asb)
![Mypy](https://img.shields.io/badge/mypy-checked-blue)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
![Python](https://img.shields.io/pypi/pyversions/eventiq-asb)
![Format](https://img.shields.io/pypi/format/eventiq-asb)
![PyPi](https://img.shields.io/pypi/v/eventiq-asb)

# eventiq-asb

Azure Service Bus broker implementation for eventiq


## Installation

```shell
pip install eventiq-asb
```

With optional dependencies:

```shell
pip install 'eventiq-asb[aiohttp]'
```


## Usage

```python
from eventiq import CloudEvent, Service

from eventiq_asb import AzureServiceBusBroker, DeadLetterQueueMiddleware

service = Service(
    name="example-service",
    broker=AzureServiceBusBroker(
        topic_name="example-topic", url="sb://example.servicebus.windows.net/"
    ),
)

service.add_middleware(DeadLetterQueueMiddleware)

@service.subscribe(topic="example-topic")
async def example_consumer(message: CloudEvent):
    print(message.data)

```
