Skip to main content

Developer-friendly RPC client to publish RPC requests and receive responses.

Project description

python3-cyberfusion-rpc-client

This library provides a developer-friendly interface to do RPC requests (using Pika).

The library can be used on the requesting side of RabbitMQ consumer.

Install

Debian

Run the following commands to build a Debian package:

mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc

PyPI

Run the following command to install the package from PyPI:

pip3 install python3-cyberfusion-rpc-client

Configure

No configuration is supported.

Usage

Example

from cyberfusion.RPCClient import RPCClient, ContentType
from cyberfusion.RPCClient.containers import RabbitMQCredentials

credentials = RabbitMQCredentials(
    ssl_enabled=True,
    port=5672,
    host='localhost',
    username='guest',
    password='guest',
    virtual_host_name='/',
)

queue_name = 'example.com'
exchange_name = 'dx_order_fruit'

client = RPCClient(credentials, queue_name=queue_name, exchange_name=exchange_name)
response = client.request(body={'amount': 10000, 'type': 'banana'}, content_type=ContentType.JSON)

print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python3_cyberfusion_rpc_client-1.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file python3_cyberfusion_rpc_client-1.0.1.tar.gz.

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f83fd3eebca7ee569f2e7cef1c681227a01ade675fb4c732db9798ad569ae736
MD5 f49865dc28ee552e05cfcc73f17a2672
BLAKE2b-256 e657f61e738b35efd9dd75589b26ab3030b406c5ba106e050a6b43bfbc76ebfc

See more details on using hashes here.

File details

Details for the file python3_cyberfusion_rpc_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa27d365cd518c6c199efe4a3ce7ab95539646dfb758964cf88a35c71ed2cb3a
MD5 d2aade50deb3d3d47fa8781aa60f91f8
BLAKE2b-256 a5614f9c87443e6c48cf14d54a43c2e3387867be620fabaaf208bcc99f1af9c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page