Metadata-Version: 2.4
Name: amqp-rs
Version: 0.1.0.post2
Classifier: Development Status :: 4 - Beta
Classifier: Natural Language :: English
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
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 :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Communications
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
License-File: LICENSE
Summary: Python AMQP Client Library developed in Rust using PyO3.
Keywords: packaging,dependency,amqp,async,fast,rust,amqp-rs
Author-email: "João Pedro Miranda C. Hluchan" <berrytern@gmail.com>
Maintainer-email: "João Pedro Miranda C. Hluchan" <berrytern@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Bug Tracker, https://github.com/berrytern/amqp-rs/issues
Project-URL: Homepage, https://github.com/berrytern/amqp-rs
Project-URL: Repository, https://github.com/berrytern/amqp-rs
Project-URL: Source, https://github.com/berrytern/amqp-rs

# amqp-rs

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
<a href="https://pypi.org/project/amqp-rs" target="_blank">
    <img src="https://img.shields.io/pypi/v/amqp-rs?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/amqp-rs" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/amqp-rs.svg?color=%2334D058" alt="Supported Python versions">
</a>

**amqp-rs** is a Python client library with a high level of abstraction for manipulating messages in RabbitMQ.

---

### What is "amqprs"
It is a Python extension developed in Rust using PyO3. It acts as a wrapper for the [amqp-client-rust](https://github.com/berrytern/amqp-client-rust) library, inheriting its performance, stability, and asynchronous capabilities.

### Features
- **Thread Safe**: Built on Rust's memory safety guarantees.
- **Asynchronous API**: Powered by `tokio` and `pyo3-asyncio` for high-performance I/O.
- **Automatic Management**: Handles the creation and management of queues, exchanges, and channels automatically.
- **Persistence**: Built-in connection persistence and automatic reconnection.
- **Flexible Exchanges**: Full support for direct, topic, and fanout exchange types.
- **RPC Support**: Native abstractions for Remote Procedure Calls (RPC).
- **Compression**: Built-in support for `zstd`, `zlib`, and `lz4` encoding.
- **TLS/SSL**: Robust encryption support including mutual TLS (client authentication).
- **Graceful Shutdown**: Ability to stop consumers cleanly and process remaining messages before closing.

---

### Installation

You can install `amqp-rs` directly from PyPI using `uv` or `pip`:

```bash
uv add amqp-rs
```

### Configuration
The library uses specialized objects to manage connection behavior and Quality of Service (QoS):


#### Connection Settings

- `ConfigOptions`: Defines primary queue names and RPC exchange/queue settings.

- `Config`: Contains connection parameters such as `host`, `port`, `username`, `password`, and `virtual_host`.

#### QoS and Confirmations (`QoSConfig`)

You can fine-tune performance and reliability using QoSConfig:

- Confirmations: Enable or disable publisher confirmations for standard publishing or RPC (`pub_confirm`, `rpc_client_confirm`, `rpc_server_confirm`).

- Acknowledge: Set automatic acknowledgement for subscriptions or RPC handlers (`sub_auto_ack`, `rpc_server_auto_ack`).

- Prefetch: Control the flow by setting prefetch counts for different connection types to manage how many unacknowledged messages the client can hold.
