Pynenc RabbitMq Plugin
RabbitMq state backend plugin for Pynenc, providing distributed task state management using RabbitMq as the storage backend.
Features
- 🚀 High Performance: Optimized RabbitMq operations with connection pooling
- 🔒 Distributed Locking: RabbitMq-based distributed locks for task coordination
- 🎯 Type Safe: Full type hints and mypy compatibility
- 🧪 Well Tested: Comprehensive test suite with multiple RabbitMq versions
- 📊 Production Ready: Battle-tested configuration options and monitoring
Quick Start
Installation
pip install pynenc-rabbitmq
Basic Usage
from pynenc import Pynenc
from pynenc_rabbitmq import RabbitMqStateBackend
# Create Pynenc app with RabbitMq backend
app = Pynenc().with_state_backend(
RabbitMqStateBackend.from_uri("rabbitmq://localhost:27017/pynenc")
)
@app.task
def my_task(x: int, y: int) -> int:
return x + y
# Use your tasks as normal
result = my_task(1, 2)
Configuration
Connection Configuration
from pynenc_rabbitmq import RabbitMqStateBackend, ConfigRabbitMq
config = ConfigRabbitMq(
uri="rabbitmq://localhost:27017",
database_name="my_pynenc_db",
max_pool_size=100,
write_concern_w="majority",
read_preference="primaryPreferred"
)
backend = RabbitMqStateBackend(config)
Environment Variables
You can also configure via environment variables:
export PYNENC_RABBITMQ_URI="rabbitmq://localhost:27017"
export PYNENC_RABBITMQ_DATABASE="pynenc"
export PYNENC_RABBITMQ_MAX_POOL_SIZE="100"
Documentation
Development
Setup
- Clone the repository
- Install dependencies:
poetry install --with dev - Start RABBITMQ:
docker-compose -f docker/docker-compose.yml up -d - Run tests:
poetry run pytest
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for pynenc-rabbitmq 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pynenc_rabbitmq-0.1.6.tar.gz | 417.1 kB | Without provenance | Details for pynenc_rabbitmq-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynenc_rabbitmq-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for pynenc_rabbitmq-0.1.6-py3-none-any.whl |
Total release size: 431.5 kB
Release files / pynenc_rabbitmq-0.1.6.tar.gz
| Download URL | pynenc_rabbitmq-0.1.6.tar.gz |
|---|---|
| Size | 417.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
868e7640893a0ba5af7bcef30e60d88bd6b8d007ca971e11f015a07b81d950bd
|
|
BLAKE2b-256 checksum How to use checksums |
eaadd6ad6799d1fd076625ec7974d07eddd42cd142300a06d99bf4443ae8035f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pynenc_rabbitmq-0.1.6-py3-none-any.whl
| Download URL | pynenc_rabbitmq-0.1.6-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98b354b47d0a77f61823a2cfd38593cd789ab3ca3e3a642e6687bc1c615f5482
|
|
BLAKE2b-256 checksum How to use checksums |
f5a61fe9b1bc0dfa431b7e68119537324273a69212e0a70f4d9954e0fcf036eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pynenc-rabbitmq 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.