Micro library to spin up AMQP shoveling with transforms
Project description
AMQPEz
Personal library for spinning up quick AMQP shoveling applications, which allows for mid-transit transforms, contrary to rabbitmq-shovel. See this Example.
Install
Simply run
pip3 install AMQPEz
Basics
Essentially you build your configuration
conf = AMQPEzConfigBuilder() \
.add_connection_params("localhost") \
.add_basic_credentials("guest", "guest") \
.add_exchange("test_exchange") \
.add_queue('test_queue') \
.add_serializers(serialize, deserialize) \
.add_task(lambda x: x+5) \
.add_qos(1) \
.build()
And start your shovel, which runs the specified task (here we add 5).
amqpez = AMQPEz(conf)
try:
amqpez.start()
except KeyboardInterrupt:
amqpez.stop()
The consumer is quite similar to a very standard pika async consumer. It will include ISID tracking to tackle publish network timeouts in a future update. This also works seemlessly with protobuf, since you essentially plug all serialization.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file AMQPEz-1.0.0.tar.gz
.
File metadata
- Download URL: AMQPEz-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f07fd2bb17cebb15c1c0d9c55aa118d3ebea803b1a1b671eb97648d2a5a38a |
|
MD5 | e2311235ca521062ddcdb3e0ed4f7540 |
|
BLAKE2b-256 | e279a7908ec23e1dece68b9b930653a4fbf4ac75f46df436441422337c0cbf8b |
File details
Details for the file AMQPEz-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: AMQPEz-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1fc0e9886c1c64ee06ddc5b48857e871e72eae6ca897d065e8a4450fb8b2198 |
|
MD5 | 32137c6995dd63f7ab934034923ce842 |
|
BLAKE2b-256 | 3a89d24ae0d4a22ca26d438efa68c3a8438277e0f0558d821802dcadf7c43e5a |